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;
  
  
  

Reply via email to