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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20183

ErrorDocument screws up proxied responses other than 200 OK

           Summary: ErrorDocument screws up proxied responses other than 200
                    OK
           Product: Apache httpd-2.0
           Version: 2.0.45
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_proxy
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Hi!

In my project we use Apache 2.0.45 as front-end to proxy certain requests to a 
backend HTTP server. We also use the ErrorDocument feature of Apache for 
predefined error pages. 

When using range requests and ErrorDocument in conjunction we see some strange 
behaviour, all 20* responses from the backend HTTP server other than 200 OK are 
handled as errors by Apache. When the backend HTTP server for example returns a 
206 PARTIAL CONTENT the Apache returns the ErrorDocument to the user.
This behaviour has been verified by running telnet to port 80 on both Apache 
and the HTTP backend server.

I had a quick peek in the code for proxy_http.c and I think I found what's 
causing this problem:

(line 984-987)
..
if ( conf->error_override ) {
    /* the code above this checks for 'OK' which is what the hook expects */
    if ( r->status == HTTP_OK)
        return OK;
..

I changed the r->status == HTTP_OK to check for 200-206 HTTP responses, 
compiled and it seems to work now. 

Cheers

/Marcus Janson
<-- tre.se -->

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

Reply via email to