Bug 44673 - ServletInputStream still readable even when closed
ServletInputStream still readable even when closed
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Catalina
Unknown
All All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-03-25 15:32 UTC by Damien Bonvillain
Modified: 2008-07-30 10:41 UTC (History)
0 users



Attachments
Echo "OK" if the behaviour is correct, "KO" otherwise (816 bytes, text/plain)
2008-03-25 15:32 UTC, Damien Bonvillain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damien Bonvillain 2008-03-25 15:32:18 UTC
Created attachment 21716 [details]
Echo "OK" if the behaviour is correct, "KO" otherwise

InputBuffer does not check "closed" in any read, mark, skip operation, thus bytes can be read even when the application has requested to close the inputstream. This causes programming problems to go unnoticed. See the attached test case.
Comment 1 Mark Thomas 2008-04-05 11:12:22 UTC
This has been fixed in 6.0.x and will be included in the next release.
It has been proposed for inclusion in 5.0.x.
Comment 2 Mark Thomas 2008-07-30 10:41:51 UTC
This has been fixed in 5.5.x and will be included in 5.5.27 onwards.