hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helbrass <helbr...@gmail.com>
Subject Wrong "Connection" header behaviour
Date Thu, 19 Jul 2012 09:44:21 GMT
Good day!

Just discovered really strange behaviour from HttpCore NIO 4.2.1, not sure  
if it's a bug or I'm just using it in a wrong way...

Steps to reproduce:

1. use NoConnectionReuseStrategy
2. add ResponseConnControl to HttpProcessors
3. implement almost empty HttpAsyncResponseProducer
4. make a request using Chromium
5. ResponseConnControl line 86 will not find entity and will set  
Connection header to keep-alive on line 100.
6. HttpAsyncService on line 552 will check ConnectionReuseStrategy and  
will close connection.

So as a result we have Connection: keep-alive reported but connection  
closed.
Workaround is of course to set own Connection header and do not add  
ResponseConnControl processor, but resulting code is quite messy...

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message