Re: [squid-users] Incorrect HTTP GET request from squid

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 17 Jul 2002 10:01:47 +0200

On Wednesday 17 July 2002 01.34, Eric Lawson wrote:

> With not going through the cache server. the host header is
> stripped, but the request line is left alone, which is then handled
> by the server on 203.26.51.42 and I am served the right page.

Note: When your browser is not configured to use a proxy then the
request line sent by your browser only contains the requested path,
not the host name. I.e. the same as sent by Squid..

A HTTP request to a web server MUST look like

  GET /path/to/file HTTP/1.x
  Host: requested.host.name
  [more headers]
  [blank line]

While requests sent to proxies MUST look like

  GET http://requested.host.name/path/to/file HTTP/1.x
  Host: requested.host.name
  [more headers]
  [blank line]

And servers MUST accept both formats. See RFC 2616 section 5.1.2
Request-URI for all the details.

Regards
Henrik
Received on Wed Jul 17 2002 - 02:02:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:16 MST