-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian,

Christian Kindler wrote:
| 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.

[snip]

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

Maybe try this:

~     if (request.getContentLength() > 1000000) {
~        request.getInputStream().close();

~         throw new ServletException("request limit exceeded.");
~     }

...or some variant thereof.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfR/X0ACgkQ9CaO5/Lv0PBJygCguQsz7f87pxZwKsdY+wloQMCi
zaQAn1jn6Wuxrvzt4WV5skm4F8+OS6D6
=WHLf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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