[squid-users] Squid GET format

From: Sketch <sketchster@dont-contact.us>
Date: Fri, 21 Apr 2006 08:50:48 -0700

Hey Folks,

I'm troubleshooting an issue right now, here is the scenario:

Squid is set up with:

httpd_accel_uses_host_header on

because the site uses Host Based Virtual Hosts The problem comes in
when a 302 code is returned. For example: my site: sketch.com
returns a 302 with the Location: header of "http://www.sketch.com".
Squid doesn't handle this properly and tries to redirect to
"http://www.sketch.comhttp//sketch.com".

The request looks like:

GET http://sketch.com/ HTTP/1.0
Host: sketch.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cache-Control: max-age=259200
Proxy-Connection: keep-alive

And the response looks like:

HTTP/1.1 302
Date: Fri, 21 Apr 2006 15:42:31 GMT
Server: Apache/1.3.34
Location: http://www.sketch.comhttp://sketch.com/

As you can see, the apache server is taking the request "GET
http://sketch.com/", and the server is taking that literal.

Reading documentation shows that the Host: value is put into the URI
by the httpd_accel_uses_host_header on option, is there any option to
not have the host value in the URI? So the request from squid would
look like:

Get /index.html
Host: sketch.com

Like most requests?

Thanks!
Received on Fri Apr 21 2006 - 09:50:49 MDT

This archive was generated by hypermail pre-2.1.9 : Mon May 01 2006 - 12:00:02 MDT