On Mon, Aug 30, 2010 at 7:38 PM, Anderson Brown <span dir="ltr"><<a href="mailto:andersonbrown8@gmail.com">andersonbrown8@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>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?<br></blockquote><div><br></div><div><br></div><div>

Yes. From varnishd(1), parameters:</div><div><br></div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 16px; color: rgb(34, 34, 34); "><dt>http_headers</dt><dd style="margin-top: 3px; margin-bottom: 10px; margin-left: 30px; text-align: justify; line-height: 20px; ">

<p class="first" style="margin-top: 0px !important; text-align: justify; line-height: 20px; ">Units: header lines Default: 64</p><p class="last" style="margin-top: 0px; text-align: justify; line-height: 20px; ">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.</p>

</dd></span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>------------------------------------------------------------------------------------------------------<br>


<br><b style="color:rgb(204, 0, 0)">Exhibit A:  [HTTP 200 OK] 28 Request Headers (including the GET and HOST headers):<br></b><br>root@machine>telnet localhost 7081<br>Trying 127.0.0.1...<br>Connected to localhost.<br>


Escape character is '^]'.<br>GET / HTTP/1.1<br>Host: localhost:7081<br>a: 1<br>b: 2<br>c: 3<br>d: 4<br>e: 5<br>f: 6<br>g: 7<br>h: 8<br>i: 9<br>j: 10<br>k: 11<br>l: 12<br>m: 13<br>n: 14<br>o: 15<br>p: 16<br>q: 17<br>


r: 18<br>s: 19<br>t: 20<br>u: 21<br>v: 22<br>w: 23<br>x: 24<br>y: 25<br>z: 26<br><br><span style="background-color:rgb(0, 102, 0);color:rgb(255, 255, 255)">HTTP/1.1 200 OK</span><br>Server: Apache-Coyote/1.1<br>Set-Cookie: JSESSIONID=7F2827B4D4327E2AFC10E13D26B415EC; Path=/<br>


Content-Type: text/html;charset=ISO-8859-1<br>Content-Length: 5<br>Date: Mon, 30 Aug 2010 17:30:28 GMT<br>X-Varnish: 1696828212<br>Age: 0<br>Via: 1.1 varnish<br>Connection: keep-alive<br><br>------------------------------------------------------------------------------------------------------<br>


<br><b style="color:rgb(204, 0, 0)">Exhibit B:  [HTTP 400 BAD REQUEST] 29 Request Headers (including the GET and HOST headers):<br></b><br>root@machine>telnet localhost 7081<br>Trying 127.0.0.1...<br>Connected to localhost.<br>


Escape character is '^]'.<br>GET / HTTP/1.1<br>Host: localhost:7081<br>a: 1<br>b: 2<br>c: 3<br>d: 4<br>e: 5<br>f: 6<br>g: 7<br>h: 8<br>i: 9<br>j: 10<br>k: 11<br>l: 12<br>m: 13<br>n: 14<br>o: 15<br>p: 16<br>q: 17<br>


r: 18<br>s: 19<br>t: 20<br>u: 21<br>v: 22<br>w: 23<br>x: 24<br>y: 25<br>z: 26<br>aa: 1<br><br><b><span style="background-color:rgb(204, 0, 0);color:rgb(255, 255, 255)">HTTP/1.1 400 Bad Request</span><br style="background-color:rgb(204, 0, 0)">


</b>Server: Varnish<br>Retry-After: 0<br>Content-Type: text/html; charset=utf-8<br>Content-Length: 464<br>Date: Mon, 30 Aug 2010 17:30:34 GMT<br>X-Varnish: 1696828213<br>Age: 0<br>Via: 1.1 varnish<br>Connection: close<br>


<br><br><?xml version="1.0" encoding="utf-8"?><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br> "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"><br>


<html><br>  <head><br>    <title>400 Bad Request</title><br>  </head><br>  <body><br>    <h1>Error 400 Bad Request</h1><br>    <p>Bad Request</p><br>    <h3>Guru Meditation:</h3><br>


    <p>XID: 1696828213</p><br>    <hr><br>    <address><br>       <a href="<a href="http://www.varnish-cache.org/" target="_blank">http://www.varnish-cache.org/</a>">Varnish cache server</a><br>


    </address><br>  </body><br></html><br>Connection closed by foreign host.<br>
<br>_______________________________________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org">varnish-dev@varnish-cache.org</a><br>
<a href="http://lists.varnish-cache.org/mailman/listinfo/varnish-dev" target="_blank">http://lists.varnish-cache.org/mailman/listinfo/varnish-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><div>Per Buer,  Varnish Software<br>

Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer</div><br>