tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Klop <>
Subject POST request with timeout acts weird
Date Fri, 02 Oct 2009 13:20:04 GMT

I have made the servlet which I include below. If I send this request to it:

> telnet localhost 8080
POST /timeout HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 100 

But I don't send any data. My servlet than waits in getParameterMap(), because that try's
to read the inputstream and parse the parameters. After 20 seconds (Connector has connectionTimeout="20000")
the reading of the inputstream ends, but my application just gets an empty Map in stead of
some TimeoutException. In this case the browser receives a HTTP 200 OK in stead of HTTP ???

Why? And how should I handle this?

(The real problem is that IE has some issue's and that some of my customers sometimes send
synchronous ajax calls which don't send any data. I'm investigating that too. If somebody
has a tip about that it is also appreciated.)


packages test;
import ...;
public final class TimeoutTestServlet extends HttpServlet {
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        Map params = req.getParameterMap();
        System.out.println("params: " + params);



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message