an existing connection was forcibly closed by the remote host

F

figelwump

Hello,

I am developing an HTTP/1.1 proxy server in c#.net. I am encountering
the following exception when I try to send the response body back to
the client: "An existing connection was forcibly closed by the remote
host". This exception is thrown by the Socket.Send() method (where the
specific socket in this case is the client socket).

Additionally, if I do not send the response headers back to the client,
I do not get this error when sending the response body.

Any ideas/pointers on this issue?

Thanks,
Vishal
 
F

figelwump

Thanks for the pointer. I also suspected that the issue was related to
the headers, so I did try removing the the Connection: close header
from the response. This did not change the exception. Also I am not
setting the Connection header in the request I pass to the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top