From: Roy T. Fielding Date: Thu, 26 Aug 1999 15:52:46 +0000 (+0000) Subject: Use less memory when generating an error message. X-Git-Tag: PRE_APR_CHANGES~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8d5b393f244eb37c76400c88ee78bf18b283f90;p=apache Use less memory when generating an error message. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83775 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 0cee618fd9..0e330028f1 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -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) {