[Varnish] #939: Error 400 if a single header exceeds 2048 characters

Varnish varnish-bugs at varnish-cache.org
Thu Jun 16 00:00:48 CEST 2011

#939: Error 400 if a single header exceeds 2048 characters
 Reporter:  david  |        Type:  defect
   Status:  new    |    Priority:  normal
Milestone:         |   Component:  build 
  Version:  trunk  |    Severity:  normal
 Keywords:         |  

 After upgrading to Varnish 3.0.0-beta2 from 2.1.5 users began to
 experience many Error 400 Bad Request pages. We found that this was
 happening because many of our links were referred to by URLs that are
 close to or exceed 2048 characters. The client then passes along a
 Referrer header that Varnish cannot handle. This is a snippet from

     3 RxHeader     c User-Agent: curl/7.21.2 (x86_64-apple-darwin10.6.0)
 libcurl/7.21.2 OpenSSL/1.0.0c zlib/1.2.5 libidn/1.19
     3 RxHeader     c Host: bil1-varn01
     3 RxHeader     c Accept: */*
     3 LostHeader   c Referer:
     3 HttpGarbage  c HEAD
     3 VCL_call     c error deliver
     3 VCL_call     c deliver deliver
     3 TxProtocol   c HTTP/1.1
     3 TxStatus     c 400
     3 TxResponse   c Bad Request
     3 TxHeader     c Server: Varnish

 My expectation is that Varnish will discard any headers that it cannot
 deal with. Is there a way to change this behavior now? I am removing long
 headers before they get to Varnish to work-around the problem now.


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

More information about the varnish-bugs mailing list