[Varnish] #1255: Incorrect URL constructed for requests with an absolute URI in the request line

Varnish varnish-bugs at varnish-cache.org
Wed Jan 23 13:00:48 CET 2013

#1255: Incorrect URL constructed for requests with an absolute URI in the request
 Reporter:  tstarling  |       Type:  defect
   Status:  new        |   Priority:  normal
Milestone:             |  Component:  build
  Version:  trunk      |   Severity:  normal
 Keywords:             |
 According to RFC 2616 section 5.1.2:

 "To allow for transition to absoluteURIs in all requests in future
 versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI form in
 requests, even though HTTP/1.1 clients will only generate them in requests
 to proxies."

 This handy property of HTTP is commonly used to route requests to the
 desired server in a cluster, by setting the HTTP proxy parameter in a
 client such as cURL or LWP. Varnish does not follow this specified
 behaviour in some respects.

 If I send such a request to a Varnish 3.0.3 server, for example with:

 curl -x varnish:80 http://upload.wikimedia.org/foo

 varnishncsa reports a log entry with a URL of


 That is, the protocol and host header are simply concatenated to the
 request URI, whether it is absolute or not.

 The request appears to be forwarded correctly to the backend, but the bug
 does break purging:


 See the terrible hackish workaround we implemented to allow purging from
 an LWP client:


Ticket URL: <https://www.varnish-cache.org/trac/ticket/1255>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list