httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject 404 errors for server-parsed files not logged in error log (fwd)
Date Sat, 19 Apr 1997 18:28:24 GMT

---------- Forwarded message ----------
Date: Sat, 19 Apr 97 05:10:47 CDT
From: John Van Essen <vanes002@maroon.tc.umn.edu>
Reply-To: vanes002@umn.edu
To: apache-bugs@apache.org
Subject: 404 errors for server-parsed files not logged in error log

Description: If a server-parsed file is Not Found, the error is
             registered in the access log but not in the error log.
Apache version: 1.2b2 (didn't see anything in the Changes file about this)
Level: Non-critical

srm.conf:  (showing that .html files are handled as server-parsed)
AddType text/x-server-parsed-html .html

http.log:  (showing two GETs - one for html and the other for txt)
cplusr.oto.umn.edu - - [19/Apr/1997:03:43:06 -0400] "GET /foobar.html HTTP/1.0" 404 -
cplusr.oto.umn.edu - - [19/Apr/1997:03:43:11 -0400] "GET /foobar.txt HTTP/1.0" 404 -

error.log:  (no entry for foobar.html 404 error)
[Sat Apr 19 03:41:27 1997] - lingering_close
[Sat Apr 19 03:43:11 1997] access to /gate/prod/www/foobar.txt failed for cplusr.oto.umn.edu,
reason: File does not exist

http.log:  (for directory with .htaccess Options without Includes)
cplusr.oto.umn.edu - - [19/Apr/1997:04:01:15 -0400] "GET /~jve/foobar.html HTTP/1.0" 404 -
cplusr.oto.umn.edu - - [19/Apr/1997:04:01:20 -0400] "GET /~jve/foobar.txt HTTP/1.0" 404 -

error.log:  (containing entry for non-server-parsed foobar.html 404 error)
[Sat Apr 19 04:01:15 1997] access to /home/jve/public_html/foobar.html failed for cplusr.oto.umn.edu,
reason: File does not exist
[Sat Apr 19 04:01:20 1997] access to /home/jve/public_html/foobar.txt failed for cplusr.oto.umn.edu,
reason: File does not exist

http_core.c:  (Example of correct code)
int default_handler (request_rec *r)
...
    if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) {
        log_reason("File does not exist", r->filename, r);
        return NOT_FOUND;
    }

mod_include.c:  (Location of missing log_reason)
int send_parsed_file(request_rec *r)
...
    if (r->finfo.st_mode == 0) return NOT_FOUND;


In addition, while grepping for 404, I noticed that there's a
hard-coded 404 in mod_dir.c - should be NOT_FOUND:

mod_dir.c:      if (rr->status && rr->status != 404 && rr->status
!= 200)


        John Van Essen  <jve@gamers.org>




Mime
View raw message