Currently, if a request comes in with a header longer than maxHttpHeaderSize, Tomcat drops the connection and does not log anything. Here is what it looks like from client point of view with the default maxHttpHeaderSize of 4K. Overly long header: % curl -H "$(perl -e 'print q{X: }, q{a}x10000')" http://tomcat/admin/ curl: (52) Empty reply from server I am adding a small diagnostic message to catch such cases (patch attached). With that patch in place we get a nice message in the logs and we can grep and see how often we hit the limit: jvm 1 | Sep 15, 2005 6:51:45 PM org.apache.coyote.http11.InternalInputBuffer fill jvm 1 | INFO: Request header is too large
Created attachment 16467 [details] patch that adds a diagnostic message on header-too-long errors
Similarly, I don't see the point.
I actually like the diagnostic message, it's helpful. It should be a rare event (so no big performance hit from logger.info), but when it does happen, the developer would want to know...
It would also create a nice way to have the server fills out log files predictably. Frankly, it's useless.
Since the patch is logging at the info level - I would guess that most production environments leave info turned off so the log filling issue wouldn't be a non-issue.
(In reply to comment #5) > Since the patch is logging at the info level - I would guess that most > production environments leave info turned off so the log filling issue wouldn't > be a non-issue. Ok.
Fix applied on 5.0 branch. Thanks for contributing it.