]> granicus.if.org Git - apache/commitdiff
Use less memory when generating an error message.
authorRoy T. Fielding <fielding@apache.org>
Thu, 26 Aug 1999 15:52:46 +0000 (15:52 +0000)
committerRoy T. Fielding <fielding@apache.org>
Thu, 26 Aug 1999 15:52:46 +0000 (15:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83775 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_core.c

index 0cee618fd9c9eb57c248245184fe2e4b2fda2f25..0e330028f16432747eea3cc212bb2e243eb9445b 100644 (file)
@@ -2500,16 +2500,10 @@ static int default_handler(request_rec *r)
     }
 
     if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) {
-       char *emsg;
-
-       emsg = "File does not exist: ";
-       if (r->path_info == NULL) {
-           emsg = ap_pstrcat(r->pool, emsg, r->filename, NULL);
-       }
-       else {
-           emsg = ap_pstrcat(r->pool, emsg, r->filename, r->path_info, NULL);
-       }
-       ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, "%s", emsg);
+       ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
+                     "File does not exist: %s",r->path_info ?
+                     ap_pstrcat(r->pool, r->filename, r->path_info, NULL)
+                     : r->filename);
        return HTTP_NOT_FOUND;
     }
     if (r->method_number != M_GET) {