You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tim Koop <gr...@timkoop.com> on 2006/09/26 20:03:34 UTC
Forcibly closing an http connection
Hi everyone.
I'm working with fileUpload to set a maximum upload size, and it works
nicely.
However, I've noticed that it keeps on reading all the data sent, even
though I have quit listening. What I would like to do is forcibly close
the http connection when the maximum file size has been reached. This
would just save us a bit of bandwidth charges, and the user too, since
the file isn't going to be accepted anyway. I think this means the
client (browser) would complain that the connection was closed by the
server.
Does anybody have any ideas how to do this?
I've tried request.getInputStream().close(), but that doesn't seem to do it.
Thanks in advance.
--
Tim