Issue with varnish passing absolute url to backend

Michael Alger varnish at
Tue Feb 8 05:40:32 CET 2011

On Tue, Feb 08, 2011 at 03:27:02PM +1100, Thiago Figueiro wrote:
> From Michael Alger:
> > This is the normal format for an HTTP request. The most basic level
> > looks like:
> >
> > GET /username HTTP/1.0
> > Host:
> >
> > You will only see requests in the form of
> >
> > GET HTTP/1.0
> > Host:
> >
> > if the request is being made via a proxy, i.e. if the user-agent
> The "Host" header is part of the HTTP/1.1 implementation.

Most current UAs which send HTTP/1.0 requests include the Host
header, although I believe you're right in that it's only actually
required in HTTP/1.1. But there's lots of services that rely on the
Host header, because that's the only available method for having
multiple sites on the same IP/port combination.

I did consider mentioning that the host header was optional but
figured it would just confuse things, and requests without the host
header are rarely seen in the wild to the best of my knowledge.
(Doesn't mean you shouldn't be prepared to handle such requests, of

> All HTTP/1.0 requests will be in the above format, made via a
> proxy or not.

    Request-URI    = absoluteURI | abs_path

  The two options for Request-URI are dependent on the nature of the

  The absoluteURI form is only allowed when the request is being made
  to a proxy.

The Host header was added to the spec precisely because the origin
server had no way of determining what host the client thought it was
speaking to.

More information about the varnish-misc mailing list