tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Kindler <...@kruescho.de>
Subject Re: interrupting a multipart post request?
Date Fri, 14 Mar 2008 14:17:39 GMT
Christian Kindler schrieb:
> Christopher Schultz schrieb:
>> 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.
>>
>> Maybe try this:
>>
>> ~     if (request.getContentLength() > 1000000) {
>> ~        request.getInputStream().close();
>>
>> ~         throw new ServletException("request limit exceeded.");
>> ~     }
>>
>> ...or some variant thereof.
> 
> Hello Christopher,
> 
> that works, thanks!

Sorry, I was a little bit headily. Ist does not work.
Is something like Thread.currentThread().interrupt() the only way to 
stop a multipart post request?

Regards, Christian

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


Mime
View raw message