You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/06/02 02:55:38 UTC

DO NOT REPLY [Bug 35166] New: - ap_send_error_response ignores status returned by handler

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=35166>.
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=35166

           Summary: ap_send_error_response ignores status returned by
                    handler
           Product: Apache httpd-2.0
           Version: 2.0.54
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: nas-apache@arctrix.com


This bug appears to affect both Apache 1.3 and 2.x.  I think the core problem is
that ap_send_error_response sometimes ignores that status code returned by the
handler function and uses r->status_line instead.  For example,
ap_scan_script_header_err_core may return a status of 304 (from
ap_meets_conditions).  The problem is that r->status_line may have been set by a
"Status" header.  An example CGI script that triggers the bug:

print "Status: 200 OK\r\n"
print "Context-Type: text/plain\r\n"
print "Last-Modified: Thu, 14 Apr 2005 00:10:07 GMT\r\n"
print "\r\n"
print "Hello world.\n"

The ugly effect of this bug is that Apache can send 200 as the status when it
thinks it is sending a 304 response.  It does not send a Content-Length header
and the browser and server end up hanging.  I've tested this with a CGI script
like the one above, Apache 1.3, and Firefox 1.0.3.  I'm fairly sure recent
versions of Apache have the same bug.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org