title: Is there a practical HTTP Header length limit?
body: <p>I have a web application that adds contextual information to <a href="http://www.w3.org/TR/XMLHttpRequest/" rel="noreferrer">XmlHttpRequest</a> objects using the <a href="http://www.w3.org/TR/XMLHttpRequest/#setrequestheader" rel="noreferrer">setRequestHeader</a> API.  I am using a custom header name (e.g. X-Foo) and a <a href="http://www.json.org/" rel="noreferrer">JSON</a> structured value.  It isn't part of the URL QueryString or POST body because it is meta information about the request.</p>
  
  <p>Is there a practical size limit to the header value?  If my JSON gets truncated, it becomes unparseable.   I am most concerned with limits in Apache 2, Tomcat 6 and IIS 7.  I did a Google search for <strong>http header length limit</strong>, but many of the results seem dated.  There are some relevant comments in <a href="https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get">How big can a user agent string get?</a> but not as specific as I would like.</p>
  
  <p><strong>Edit:</strong>
  I just ran across this similar question - <a href="https://stackoverflow.com/questions/686217/maximum-on-http-header-values">Maximum on http header values?</a></p>