apache2: proxypass rewrites Location headers

This is a discussion on apache2: proxypass rewrites Location headers within the Linux Web Servers forums, part of the Web Server and Related Forums category; I've been using ProxyPass and ProxyPassReverse to provide controlled access from the Internet to an internal server on a ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-19-2005
Jim Hatfield
 
Posts: n/a
Default apache2: proxypass rewrites Location headers

I've been using ProxyPass and ProxyPassReverse to provide controlled
access from the Internet to an internal server on a private address.
Only selected URI's are proxied and this works very well.

However I noticed quite by chance that even without the ProxyPassReverse
directive, Apache is still rewriting the Location header.

The target server sends back a Location header which does not have a
protocol or hostname, ie:

>Location: /something.jsp;jessionid=ALDSKFJALASLFASJFASLDFJASL KDJFA


With ProxyPassReverse, this is rewritten to have http:// and the
hostname of the proxy on the front - as expected.

Without ProxyPassReverse, it is still rewritten, but this time it
has http:// and the hostname of the target server.

It would be convenient for me if without the ProxyPassReverse line
it were not rewritten at all, and I'm curious as to why it is. I
would have thought that without any rewriting the client would
connect back using the protocol and hostname used for the initial
connection, which would be OK.

I assume the reason is that the Location header as returned by
the target server does not comply with the HTTP protocol spec, which
mandates an absolute URI - but given that it seems to work it
would be nice if it were left alone.
--
Jim Hatfield
  #2 (permalink)  
Old 10-19-2005
Tim
 
Posts: n/a
Default Re: apache2: proxypass rewrites Location headers

I think in this case you have to use the proxy facility of mod_rewrite
since to my knowledge you can't control this behaviour of mod_proxy.

T.

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:13 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0