HTTP 400 returned for a HTTP request over 28 headers?

Per Buer perbu at varnish-software.com
Mon Aug 30 23:14:44 CEST 2010


On Mon, Aug 30, 2010 at 7:38 PM, Anderson Brown <andersonbrown8 at gmail.com>wrote:

>
> Not sure what I'm missing here; but it seems like Varnish is returning HTTP
> 400 when I have an HTTP request with over 28 headers.  Is this a
> configuration limit?
>


Yes. From varnishd(1), parameters:

http_headers

Units: header lines Default: 64

Maximum number of HTTP headers we will deal with. This space is preallocated
in sessions and workthreads only objects allocate only space for the headers
they store.


>
>
> ------------------------------------------------------------------------------------------------------
>
> *Exhibit A:  [HTTP 200 OK] 28 Request Headers (including the GET and HOST
> headers):
> *
> root at machine>telnet localhost 7081
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET / HTTP/1.1
> Host: localhost:7081
> a: 1
> b: 2
> c: 3
> d: 4
> e: 5
> f: 6
> g: 7
> h: 8
> i: 9
> j: 10
> k: 11
> l: 12
> m: 13
> n: 14
> o: 15
> p: 16
> q: 17
> r: 18
> s: 19
> t: 20
> u: 21
> v: 22
> w: 23
> x: 24
> y: 25
> z: 26
>
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Set-Cookie: JSESSIONID=7F2827B4D4327E2AFC10E13D26B415EC; Path=/
> Content-Type: text/html;charset=ISO-8859-1
> Content-Length: 5
> Date: Mon, 30 Aug 2010 17:30:28 GMT
> X-Varnish: 1696828212
> Age: 0
> Via: 1.1 varnish
> Connection: keep-alive
>
>
> ------------------------------------------------------------------------------------------------------
>
> *Exhibit B:  [HTTP 400 BAD REQUEST] 29 Request Headers (including the GET
> and HOST headers):
> *
> root at machine>telnet localhost 7081
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET / HTTP/1.1
> Host: localhost:7081
> a: 1
> b: 2
> c: 3
> d: 4
> e: 5
> f: 6
> g: 7
> h: 8
> i: 9
> j: 10
> k: 11
> l: 12
> m: 13
> n: 14
> o: 15
> p: 16
> q: 17
> r: 18
> s: 19
> t: 20
> u: 21
> v: 22
> w: 23
> x: 24
> y: 25
> z: 26
> aa: 1
>
> *HTTP/1.1 400 Bad Request
> *Server: Varnish
> Retry-After: 0
> Content-Type: text/html; charset=utf-8
> Content-Length: 464
> Date: Mon, 30 Aug 2010 17:30:34 GMT
> X-Varnish: 1696828213
> Age: 0
> Via: 1.1 varnish
> Connection: close
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html>
>  <head>
>    <title>400 Bad Request</title>
>  </head>
>  <body>
>    <h1>Error 400 Bad Request</h1>
>    <p>Bad Request</p>
>    <h3>Guru Meditation:</h3>
>    <p>XID: 1696828213</p>
>    <hr>
>    <address>
>       <a href="http://www.varnish-cache.org/">Varnish cache server</a>
>    </address>
>  </body>
> </html>
> Connection closed by foreign host.
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-dev
>



-- 
Per Buer,  Varnish Software
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100830/bc2c5017/attachment-0003.html>


More information about the varnish-dev mailing list