DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38835>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38835 Summary: HttpServletRequest.readLine() doesn't block and returns null immediately Product: Tomcat 5 Version: Unknown Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Servlet & JSP API AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I am running 5.5.15 but the list doesn't show it (it only shows up to 5.5.14). I have tried this on Linux JDK 1.5.0_06 and Mac OS X JDK 1.5.0_05 This is my servlet code pruned of all nonessentials: package com.tecnoguru.test; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class Test extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { doIt(req, res); } public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { doIt(req, res); } public void doIt(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { BufferedReader rdr = req.getReader(); PrintWriter wrt = res.getWriter(); String line = rdr.readLine(); wrt.println(line); } } This is the result when doing a telnet to port 8080. Note that I did not do anything after the blank line in the request, the response started immediately. The lines I typed are prefixed by >, the lines returned are prefixed by <: >telnet localhost 8080 <Trying ::1... <Connected to localhost. <Escape character is '^]'. >GET /Test/test HTTP/1.0 > <HTTP/1.1 200 OK <Server: Apache-Coyote/1.1 <Content-Length: 6 <Date: Fri, 03 Mar 2006 01:15:14 GMT <Connection: close < <null <Connection closed by foreign host. >telnet localhost 8080 <Trying ::1... <Connected to localhost. <Escape character is '^]'. >POST /Test/test HTTP/1.0 > <HTTP/1.1 200 OK <Server: Apache-Coyote/1.1 <Content-Length: 6 <Date: Fri, 03 Mar 2006 01:15:42 GMT <Connection: close < <null <Connection closed by foreign host. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]