IBM Support

Too many headers in a request caused HTTP 400 Error (Bad Request)

Troubleshooting


Problem

If an application server receives too many headers which indicates there are more headers than are defined as the maximum allowed according to the configuration, the server will return an HTTP error 400 response to the client. However, the 400 error does not give information on the cause due to security reasons. There are no default trace entries written to indicate that too many headers is the problem either. So, the reason for the 400 error is not immediately apparent.

Symptom

Intermittent HTTP 400 errors are returned to browser clients.

Cause

Too many headers in the request.

Resolving The Problem

If you are seeing intermittent HTTP 400 errors, the following trace can be enabled to see if the cause is too many headers being sent on the request:


com.ibm.ws.http.channel.inbound.impl.*=finest

If it's determined that the cause is too many headers being sent with the request, either increase the maximum number of headers allowed, or examine the request to understand the need for the excessive number of headers. The maximum number of headers can be increased using the 'Maximum Headers' property associated with the HTTP transport or the 'limitNumHeaders' property on an HTTP transport channel. Review the following infocenter articles for more information on this property:

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/rrun_chain_httpcustom.html

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/urun_chain_typehttp.html

[{"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Servlet Engine\/Web Container","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21456079