Hi
I want HTTPServletResponse to *close* the socket after sending the
response. For this I'm closing the OutputStream after writing the
data. But still socket is not closed and client keeps on waiting to
read data from socket.
And surprisingly this happens only if I use multipart/related in
Content-Type in the response.
Is there way to enfore HTTPServletResponse to close the server socket?
Also, is there any relation between setConentLength header of
HTTPServletResponse and whether the server will "keep-alive" the
socket connection?
thanks,
Naresh
Mike Baranczak - 01 Jun 2004 00:55 GMT
> Hi
>
[quoted text clipped - 7 lines]
>
> Is there way to enfore HTTPServletResponse to close the server socket?
Call flushBuffer() on the HTTPServletResponse. This will send all
buffered data to the client. I think this is what you were looking for.
-MB