Great question!<div><br></div><div>Just solved this problem this week...  The docs are horribly outdated / missing info :(</div><div><br></div><div>You need to use runtime parameters.  For example, to allow 20k headers (default is 2k) use the following params when you start varnish:</div>
<div><br></div><div>-p http_req_hdr_len=20000 -p http_resp_hdr_len=20000</div><div><br></div><div>Lee</div><div><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 7:14 PM, Gil Hildebrand <span dir="ltr"><<a href="mailto:gilhildebrand@gmail.com">gilhildebrand@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am testing upgrade from Varnish 2.0 to 3.0.<div><br></div><div>In some cases, because of our advertising and analytics partners, cookies can be excessively long. This appears to be a problem in Varnish 3.0, as I get a 400 Bad Request response. When I look at varnishlog, I see a LostHeader for the Cookie header.</div>

<div><br></div><div>I found some history on similar issues:</div><div><br></div><div><a href="http://comments.gmane.org/gmane.comp.web.varnish.misc/3236" target="_blank">http://comments.gmane.org/gmane.comp.web.varnish.misc/3236</a></div>

<div><a href="https://www.varnish-cache.org/trac/ticket/455" target="_blank">https://www.varnish-cache.org/trac/ticket/455</a></div><div><a href="https://www.varnish-cache.org/lists/pipermail/varnish-commit/2009-April/004227.html" target="_blank">https://www.varnish-cache.org/lists/pipermail/varnish-commit/2009-April/004227.html</a></div>

<div><br></div><div>Initially I installed Varnish via rpm, so I downloaded the source to see if I could fix the problem via patch and compile. Unfortunately, I could not find <span style="font-family:monospace;white-space:pre-wrap;font-size:medium">HTTP_HDR_MAX_VAL</span><span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif"> anywhere in the source. Was it removed? Is there now a better way to increase the max number of headers?</font></span></div>


<br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br>
</div>