API Gateway: HTTP "400 Bad Request" Error Shown When the Request Header is Too Large
Document ID :
Last Modified Date :
Show Technical Document Details
CA API Management Gateway
When an HTTP request is sent to the API Gateway with a request header size of larger than 8000 bytes, the Gateway will present a "400 Bad Request" error. The Gateway, by default, will only accept a request header size of 8000 bytes (8 KB). To work around this issue, the Gateway can be told to accept request headers larger than 8000 bytes.
To increase the size the Gateway will accept for a request header, follow the instructions below.
Open up Policy Manager.
Go to Tasks --> Manage Listen Ports.
In the Manage Listen Ports window, select the port you want to change and click the Properties button.
In the Listen Port Properties window, select the Advanced tab, then the Add button to add an advanced property to the port.
In the New Property window, configure it as follows then click the OK button:
Property Name: maxHttpHeaderSize
Click the OK button again on the Listen Port Properties window to save the changes to the listen port.
Click the Close button on the Manage Listen Ports window.
After the steps above are completed, the Listen Port Properties (Advanced tab) should look similar to the image below:
The property to add is on a per-port basis.
The property name is case-sensitive.
The value for maxHttpHeaderSize noted above is in bytes.
The value for maxHttpHeaderSize noted above can be any number you want (in bytes), but should be large enough for the Gateway to accept the request header sizes being received.
Was this information helpful?