Re: mod_proxy and HTTP 302 response
"J.D. Silvester" <[email protected]>
| Newsgroups | gmane.comp.apache.mod-proxy |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 17 Aug 2002, Brett Hutley wrote:
> What you need to do is have a look at the HTTP headers that the server
> that is doing the redirect sends BEFORE they hit your proxy server. An
> easy way to do this is to use 'wget -S' (I wish I'd known this the other
> day - I was using tcpdump to sniff the packets...). For example, when I
> fire it at my host:
>
> wget -S host.example.com
>
> I get back:
>
> HTTP request sent, awaiting response...
> 1 HTTP/1.0 200 OK
> 2 Server: Zope/(Zope 2.5.1b1 (OpenBSD package zope-2.5.1b1)
> 3 , python 2.1.2, openbsd3) ZServer/1.1b1
> 4 Date: Fri, 16 Aug 2002 22:52:44 GMT
> 5 Connection: Keep-Alive
> 6 Content-Type: text/html
> 7 Etag:
> 8 Content-Length: 289
>
> ... and you can immediately see the bad line number 3, without the
> all-important colon.
>
> Cheers, Brett
>
Brett when I use wget (by the way thanks for pointing out that tool), this
is what I get.
First without the proxy server:
% /usr/local/wget/bin/wget -S --proxy=off http://www.someserver.com/webpage.html
--10:08:01-- http://www.someserver.com/webpage.html
=> `webpage.html'
Resolving www.someserver.com... done.
Connecting to www.someserver.com[xxx.xxx.xxx.xxx]:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.0 302
2 Server: RealPage 2700
3 Set-Cookie: RealPageID=123456789; expires=Tue, 31-Dec-2002 00:00:00 GMT; path=/; domain=.someserver.com
4 Location: http://server1.someserver.com/webpage.html
5 Content-Type: text/html
Location: http://server1.someserver.com/webpage.html
[following]
--10:08:05--
http://server1.someserver.com/webpage.html
=> `webpage.html'
Resolving server1.someserver.com... done.
Connecting to server1.someserver.com[yyy.yyy.yyy.yyy]:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 Connection: Keep-Alive
3 Server: RealPage 2700
4 Content-Type: text/html
5 Content-length: 1592
100%[====================================>] 1,592 1.52M/s ETA
00:00
10:08:06 (1.52 MB/s) - `webpage.html' saved [1592/1592]
Now with the proxy server
% /usr/local/wget/bin/wget -S http://www.someserver.com/webpage.html
--10:09:27-- http://www.someserver.com/webpage.html
=> `webpage.html'
Resolving proxy.server.com... done.
Connecting to proxy.server.com[xxx.xxx.xxx.xxx]:80... connected.
Proxy request sent, awaiting response...
1 HTTP/1.1 302
Location: unspecified
ERROR: Redirection (302) without location.
Other than the first line, all the lines have a colon. So I am not sure
what is going wrong here. Any ideas?
John