I have run into an problem in which a web application has handled to produce a cookie around the client, which, when posted through the client to Apache, causes Apache to come back the next:

HTTP/1.1 400 Bad Request
Date: Mon, 08 Mar 2010 21:21:21 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 7274
Connection: close
Content-Type: text/html; charset=iso-8859-1

<title>400 Bad Request</title>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Size of a request header field exceeds server limit.<br />
Cookie: ::: A REALLY LONG COOKIE ::: </pre>
<address>Apache/2.2.3 (Red Hat) Server at www.foobar.com Port 80</address>

After considering the problem, it appears that the net application has handled to produce a really lengthy cookie, over 7000 figures. Now, don't request me the way the web application could do that, I had been of the opinion browsers were designed to stop this from happening. I have handled to develop a strategy to avoid the snacks from growing unmanageable again.

The problem I am attempting to tackle is how do you totally reset the big cookie around the client if each time the customer attempts to submit a request to Apache, Apache returns a 400 client error? I have attempted while using ErrorDocument directive, however it seems that Apache bails around the request before reaching any custom error handling.

Oh dear! I think you will need to at boost the LimitRequestFieldSize configuration option in Apache's httpd.conf to visit any more, to get so far as running the server-side script. Make certain it cleans in the snacks as rapidly as you possibly can before linked with emotions . grow again!