tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lock Ian IC" <>
Subject 6.0.19 feature to not swallow input if the connection is going to be closed
Date Fri, 08 Jan 2010 16:20:04 GMT


There was a feature introduced in 6.0.19 to not swallow the inputStream
if the servlet throws an exception and the connection is going to be

Without this, Tomcat drains the inputStream, so for example If you're
uploading a large file it ties up the thread until input is drained -
which could be ages.


I've not been able to get this feature working.  My servlet sets the
response status to SC_REQUEST_ENTITY_TOO_LARGE which Tomcat recognises
it should drop the connection for, but the code
doesn't set the error flag which controls whether or not the inputStream
is swallowed.


The line of code in question in the 6.0.20 code set
is 855.  This line checks the value of keepAlive is true before setting
the error flag which controls whether or not input is swallowed.
keepAlive has previously been set to false by line 1590 so the error
flag is not set.


Am I missing something here? Is there a specific way for the servlet to
invoke this functionality?


Thanks very much




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