I get IOExceptions when I use CoyoteReader.readLine to read the request's input if the request has many lines to it. If I read the request using CoyoteReader.read(), it works fine. The stack trace (from my bug test code) is below. I'll attach a war file that demonstrates the bug, as well as source code. I originally discovered this under 5.0.19, but thought it was caused by bug #27447. That bug was reported fixed in 5.0.20, but that fix did not fix this problem. 2004-05-13 10:30:15 StandardWrapperValve[bugTest]: Servlet.service() for servlet bugTest threw exception java.io.IOException at org.apache.coyote.tomcat5.InputBuffer.reset(InputBuffer.java:440) at org.apache.coyote.tomcat5.CoyoteReader.reset(CoyoteReader.java:121) at org.apache.coyote.tomcat5.CoyoteReader.readLine (CoyoteReader.java:178) at jimpkg.BugTest.doPost(BugTest.java:45) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
I seem to be having trouble uploading attachments, so I've posted the war file and the zip file at: http://www.netyourwork.com/download/bugtest.war and http://www.netyourwork.com/download/tomcat-5.0.24-bugtest.zip I'll try again to attach them later.
Please also submit the client code to reproduce the problem, as this works for me right now.
I'm not sure what you mean by "submit the client code to reproduce the problem" - both the war file and the zip file include /bugtest.html, which is the browser page that explains how to reproduce the bug and has a form that invokes the first servlet. The zip file also includes the source code for the two servlets. To invoke the page on my default install of Tomcat, I use http://localhost:8080/bugtest/bugtest.html. I've tried several times to attach the zip file and the war file to this bug report, but with no success. Perhaps because I'm behind a firewall and a router using NAT?
I need some data you send to the servlet, as well as how you send it (= the cleint code). I didn't look at bugtest.html (the servlet code seemed obvious, you could have done while(r.readLine() != null)), and it does look enough. I'll try it. It would have been more reliable using a custom program, of course.
I'm unable to have bugreport.html work, right now (it doesn't seem to generate anything).
The html page was just to enable me to quickly try different combinations of line length and number of lines, since some combinations worked and some did not. If after trying the html you still can't reproduce it, I'll write a little java program that tries the various combinations.
I'm ok with using your html file, but right now it doesn't work for me. For example, it accesses the BugTest1 servlet (which I think should work), and it also seems to send empty lines.
Ok, I got the thing to work. It seems like this doesn't work with Mozilla.
.
The test worked ok on IE, and the issue is now fixed.