tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Pande <>
Subject Request header too large..
Date Fri, 02 Nov 2018 21:16:45 GMT
As per current implementation (below snippet is from 8.5.28), if the request header is too
large (by default >8K, the default maxHttpHeaderSize), is thrown below error message is

For request --
02-Nov-2018 15:15:47.649 INFO [catalina-exec-40] org.apache.coyote.http11.Http11Processor.service
Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Request header is too large
                at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(
                at org.apache.coyote.http11.Http11Processor.service(
                at org.apache.coyote.AbstractProcessorLight.process(
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(

For response—

02-Nov-2018 15:15:47.867 SEVERE [catalina-exec-40] org.apache.coyote.http11.Http11Processor.endRequest
Error finishing response
org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data
to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize
on the connector or write less data into the response headers.
                at org.apache.coyote.http11.Http11OutputBuffer.checkLengthBeforeWrite(
                at org.apache.coyote.http11.Http11OutputBuffer.write(
                at org.apache.coyote.http11.Http11OutputBuffer.sendStatus(
                at org.apache.coyote.http11.Http11Processor.prepareResponse(
                at org.apache.coyote.AbstractProcessor.action(
                at org.apache.coyote.http11.Http11Processor.endRequest(

However, this doesn’t tell us the name of the offending header which I think is valuable
in debugging the issues.

Do you feel it’s worth the enhancement request?

Also, I noticed the comments

// (1) Headers plus request line size does not exceed its limit

// (2) There are enough bytes to avoid expanding the buffer when

// reading body

It says request line size ..does that mean maxHttpHeaderSize comes in play for request line
(which includes query params) as well?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message