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.
You haven't specified either a Content-Length or a Content-Encoding: chunked Request header, so Tomcat is correctly believing that the body of the request is empty. So the Reader correctly returns EOF on all attempts to read the body. Running your test case with a Content-Length request header against SVN trunk gives me the expected "Read timed out" exception, after it blocks for the configured 15sec.