On Tue, 2011-07-05 at 00:40 -0700, alin vasile wrote:
> Hi,
> 
>    I'm currently playing with http async (trunk version) and websockets and I 
> noticed that In the handshake phase, when the server responds with 101 
> Switching Protocols, the platform hangs waiting for a response:
> 
> Future<HttpResponse> future = httpclient.execute(request, null);
> HttpResponse response = future.get(); 
> 
>    I located this problem in the and I modified this class 
> NHttpClientProtocolHandler to treat only the "100 Continue" response in the 
> 1xx category as it is now, leaving the default processing (as for 200) for 
> 101 and 102. I hope this patch below helps :
> 

Alin,

Neither HttpClient not HttpAsyncClient support 101 Switching Protocols
handshake at the moment. 

I committed a slightly different fix to the problem than you proposed.
Usually HTTP agents are not meant to return 1xx status codes to the
caller, so I changed HttpAsyncClient to throw ProtocolException instead.

Please review.

Cheers

Oleg



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

Reply via email to