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 2014/02/12 19:02:29 UTC

[Bug 56131] New: ProxyPassReverse / zealously replaces Location headers

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

            Bug ID: 56131
           Summary: ProxyPassReverse / zealously replaces Location headers
           Product: Apache httpd-2
           Version: 2.4-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
          Assignee: bugs@httpd.apache.org
          Reporter: i.galic@brainsware.org

When using the following pattern to configure a reverse proxy in 2.4:

Listen 8080
ServerName proxy.local
ProxyPass / http://backend.local:9090/
<Location />
  ProxyPassReverse /
</Location>

a pattern that worked well under 2.2, and made sure the bogus Location headers
would be fixed up, 2.4 will now replace *all* Location headers with
http://proxy.local:8080/ -- that is not the desired effect, when the backend
sent correct Location: headers such as:

Location: http://example.com/foo


to redirect to a third-party system.

-- 
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


[Bug 56131] ProxyPassReverse / zealously replaces Location headers

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

--- Comment #3 from Eric Covener <co...@gmail.com> ---
2.2 won't apply / to any Location: header that doesn't start with /.

2.4 goes out of its way to strip the scheme and host from the Location: before
checking that it starts-with, so it matches more often.

r893871 and r893955 and PR38864

-- 
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


[Bug 56131] ProxyPassReverse / zealously replaces Location headers

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

--- Comment #1 from Igor Galić <i....@brainsware.org> ---
please see also  https://gist.github.com/igalic/8960285                   
https://gist.github.com/igalic/8960741 where I attempt to reproduce this for
2.2 and 2.4 respectively (+ the backend: https://gist.github.com/igalic/8960145
)

-- 
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


[Bug 56131] ProxyPassReverse / zealously replaces Location headers

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

David Teirney <ap...@teirney.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apache@teirney.net

-- 
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


[Bug 56131] ProxyPassReverse / zealously replaces Location headers

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

--- Comment #2 from Igor Galić <i....@brainsware.org> ---
addendum: If we simply use   ProxyPassReverse http://backend.local:9090/ we
don't get the fix-up of the Location: /redirect.html
It still produces "correcter" results, in that it doesn't override the
example.com URL… Still, I'd consider this a regression.

-- 
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