Wednesday, August 19, 2015

400 Bad Request, Your browser sent a request that this server could not understand

Here is a detailed explanation & solution for this problem from ibm.


Request to HTTP Server fails with Response code 400.


1. Response from the browser could be shown like this:

Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.

HTTP Server Error.log shows the following message: "request failed: error reading the headers"

2. You're speaking plain HTTP to an SSL-enabled server port.

3. some jQuery plugin, which in turn uses excess cookie data.


This is normally caused by having a very large Cookie, so a request header field exceeded the limit set for Web Server.

Diagnosing the problem

To assist with diagnose of the problem you can add the following to the LogFormat directive in the httpd.conf: error-note: %{error-notes}n

Resolving the problem

For server side: Increase the value for the directive LimitRequestFieldSize in the httpd.conf: LimitRequestFieldSize 12288 or 16384 For How to set the LimitRequestFieldSize, check Increase the value of LimitRequestFieldSize in Apache

For client side: Clear the the cache of your web browser should be fine.


No comments: