Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 23116 invoked by uid 6000); 9 Sep 1998 12:34:40 -0000 Received: (qmail 23110 invoked by alias); 9 Sep 1998 12:34:38 -0000 Delivered-To: apache-1.3-cvs@hyperreal.org Received: (qmail 23108 invoked by uid 161); 9 Sep 1998 12:34:37 -0000 Date: 9 Sep 1998 12:34:37 -0000 Message-ID: <19980909123437.23107.qmail@hyperreal.org> From: coar@hyperreal.org To: apache-1.3-cvs@hyperreal.org Subject: cvs commit: apache-1.3/src/main http_core.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org coar 98/09/09 05:34:37 Modified: src/main http_core.c Log: Add another case of providing 'why' info through *ERROR_NOTES: the default handler's 'file not found' report. Revision Changes Path 1.227 +12 -6 apache-1.3/src/main/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.226 retrieving revision 1.227 diff -u -r1.226 -r1.227 --- http_core.c 1998/08/31 13:33:51 1.226 +++ http_core.c 1998/09/09 12:34:36 1.227 @@ -2726,12 +2726,18 @@ } if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) { - 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 NOT_FOUND; + 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, emsg); + ap_table_setn(r->notes, "error-notes", emsg); + return HTTP_NOT_FOUND; } if (r->method_number != M_GET) { return METHOD_NOT_ALLOWED;