Bug 44673

Summary: ServletInputStream still readable even when closed
Product: Tomcat 5 Reporter: Damien Bonvillain <kame>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Unknown   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Echo "OK" if the behaviour is correct, "KO" otherwise

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.