httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50525] New: Header directive won't edit Location header from ProxyPass or RewriteRule
Date Tue, 28 Dec 2010 20:37:18 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50525

           Summary: Header directive won't edit Location header from
                    ProxyPass or RewriteRule
           Product: Apache httpd-2
           Version: 2.2.15
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: mod_headers
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: lmeyer@vmware.com


mod_header documentation and internet discussion seemed to indicate that I
could fix a mistaken Location: header using the Header directive. However, this
did not seem to work in the two cases that I tried.

1. ProxyPass:

ProxyPass / http://google.com/
# which of course gets a 301 to www.google.com
Header always edit Location: goo gar
# so we should go to www.gargle.com
Header always add X-Foo: bar
# just put that in to make sure Header was working at all

The response in this case includes these headers:
X-Foo: bar
Location: http://www.google.com/

So, Location was unaffected.

2. RewriteRule

RewriteEngine on
RewriteRule ^.* http://www.foo.com/ [R]
# so everything is redirected to www.foo.com
Header always edit Location: foo bar
# which should modify it to www.bar.com
Header always add X-Foo: bar

The response then includes:
X-Foo: bar
Location: http://www.foo.com/

Again, Location was unaffected.

If the Location header is added with Header, then a later edit does work. But I
can't get it to affect proxied responses, which is what I really wanted. The
docs don't indicate any reason why this should fail. So either the docs or
mod_headers should be fixed.

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


Mime
View raw message