DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39405>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39405

           Summary: %>s incorrectly logs status code as 70007
           Product: Apache httpd-2
           Version: 2.2.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: mod_log_config
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Running a log parsing program against the access.log for an Apache 2.2.0 server
I noticed it throwing out lots of errors as invalid. When I looked closely I
noticed all of those lines were failing to match the status code pattern of
3-digits because the value inserted for %>s is 70007:

218.63.252.219 - - [21/Apr/2006:22:27:14 -0400] "POST /cgi-bin/forums/forums.pl
HTTP/1.1" 70007 34200 "http://dcregistry.com/forums/dating/messages/2461.html";
"Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705)"
218.63.252.219 - - [22/Apr/2006:12:59:45 -0400] "POST /cgi-bin/forums/forums.pl
HTTP/1.1" 70007 34200 "http://dcregistry.com/forums/dating/messages/560.html";
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)"
218.63.252.219 - - [23/Apr/2006:05:02:17 -0400] "POST /cgi-bin/forums/forums.pl
HTTP/1.1" 70007 35217 "http://dcregistry.com/forums/music/messages/2467.html";
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)"


Reading around it seems that 70007 is an APR error code for a time out and I
have seen it used as such in the error log when an error occurs writing to the
network. But I think it is an error to log this number as the "status code" in
the access log because, according to the Apache docs:

 http://httpd.apache.org/docs/2.2/logs.html

 "This is the status code that the server sends back to the client.
   ...
  The full list of possible status codes can be found in the HTTP
  specification (RFC2616 section 10)."

70007 isn't a valid HTTP status code so it is incorrect to log it.
I haven't looked into this further but I wonder if it is being generated
because the log format is %>s - I.e. the last status that is generated.
Since this occurs in an error condition to do with timing out the network
response it seems likely it is occuring after the headers have been generated
(and possibly sent) and when this error is generated Apache is overwriting the
actual "last" status code. It maybe that the code is intending to replace the
last status with a 5xx error and is incorrectly copying the APR code into
place.



I'm using the config:

  LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
  CustomLog /usr/local/apache/logs/access.log combined


apollo# httpd -M
Loaded Modules:
 core_module (static)
 authn_file_module (static)
 authn_default_module (static)
 authz_host_module (static)
 authz_groupfile_module (static)
 authz_user_module (static)
 authz_default_module (static)
 auth_basic_module (static)
 include_module (static)
 filter_module (static)
 log_config_module (static)
 env_module (static)
 setenvif_module (static)
 mpm_prefork_module (static)
 http_module (static)
 mime_module (static)
 autoindex_module (static)
 suexec_module (static)
 cgi_module (static)
 negotiation_module (static)
 dir_module (static)
 actions_module (static)
 alias_module (static)
 rewrite_module (static)
 so_module (static)
 frontpage_module (shared)
 php5_module (shared)
Syntax OK

Colin.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to