Hello,

I'm not sure if this is tomcat or general servlet issue. I hope you can help me anyway.

I want to interrupt a multipart post request (e.g. if the content-length exceeds a given limit). The problem is, that the client seems to continue sending the data to the server and gets no response from the server until the whole data is send.

Please see the following doPost method. On the console the exception appears immediately, but a takes much longer until I can see the response in the browser.

public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
        if (request.getContentLength() > 1000000) {
                throw new ServletException("request limit exceeded.");
        }
}

The same thing if I try to forward the request via the RequestDispatcher: the request is forwarded when the whole data is sent to the server and not immediately.

I am using Tomcat 6.0.16 with jdk 1.6.0_04 on windows xp.

Regards,
Christian

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to