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 2009/04/27 18:18:20 UTC

DO NOT REPLY [Bug 47106] New: Proxying of ErrorDocument path overwrites HTTP Status

https://issues.apache.org/bugzilla/show_bug.cgi?id=47106

           Summary: Proxying of ErrorDocument path overwrites HTTP Status
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: All
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: ross.heritage@gmail.com


I have a slightly unusual setup where all content is retrieved via mod_proxy
from various servers. However, to more clearly demonstrate the issue, I can
simplify things to this configuration:

ProxyErrorOverride On
ErrorDocument 404 /404error.html

RewriteEngine On
RewriteRule (.*) http://backend.sever$1 [P]


When requesting /whatever from this server, the initial request goes through to
'backend.server', which issues a 404 error.

The frontend server then makes another request to 'backend.server' for
'/404error.html'. backend.server has this file, so responds with an HTTP 200
response.

The headend server now responds to the original request to /whatever, returning
a HTTP 200 with the HTML for the error document.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47106] Proxying of ErrorDocument path overwrites HTTP Status

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47106

--- Comment #1 from Graham Leggett <mi...@sharp.fm> 2010-02-12 11:59:36 UTC ---
Comparing the default_handler to the proxy_handler, the default_handler is
respecting and not touching the r->status == 404 that is passed into the
subrequest.

In contrast in the proxy, proxy_run_scheme_handler() stomps on r->status,
replacing the 404 with the 200 it got from the backend.

Looks like the fix is to teach mod_proxy not to do that.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47106] Proxying of ErrorDocument path overwrites HTTP Status

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47106

Graham Leggett <mi...@sharp.fm> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugs@httpd.apache.org       |minfrin@sharp.fm

--- Comment #2 from Graham Leggett <mi...@sharp.fm> 2010-02-12 16:25:31 UTC ---
Created an attachment (id=24976)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24976)
Fix for the problem

The proxy_handler was overwriting r->status with the response code from the
backend, which was then faithfully passed to the frontend. This patch works out
when the original value should be maintained and passed to the client.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org