On Sat, 2011-02-19 at 12:59 +0800, LongkerDandy wrote:
> Hi
> 
> I'm using latest version of HTTP Core.
> And I'm following the sample "Basic HTTP Server" (
> http://hc.apache.org/httpcomponents-core-ga/examples.html).
> But I keep getting the error: Connection Reset.
> 
> Every time I finished handle the request, and write the response with
> "response.setEntity".
> It seems working well and my http client received the response.
> But then the Connection Reset IO Exception occurred, and caught by worker
> thread at the server side.
> 
> I noticed the client is keep asking for requests.
> Maybe the client doesn't close the connection politely or something else.
> But how should I handle this in my HTTP Server?
> 
> Thanks
> LongkerDandy

It is difficult to say without having any details what so ever, but I
suspect this is something wrong with connection persistence either on
the client or the server side. 

Some sort of a wire log would be quite helpful. Please have a look at
LoggingSessionInputBuffer and LoggingSessionOutputBuffer classes from
HttpClient [1]. You might use similar approach to add wire logging
capabilities to your server using a logging toolkit of your choosing.

[1]
http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/conn/LoggingSessionInputBuffer.html
http://hc.apache.org/httpcomponents-client-ga/httpclient/xref/org/apache/http/impl/conn/LoggingSessionOutputBuffer.html
  




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to