Alan Silva created HTTPCLIENT-1655:
--------------------------------------
Summary: HttpClient sends RST instead of proper FIN ACK sequence
when using non-persistance
Key: HTTPCLIENT-1655
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1655
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpClient
Affects Versions: 4.4.1
Reporter: Alan Silva
I'm seeing an interesting behavior with HttpClient 4.4.1 GA (latest release as
of the writing of this issue) when trying to make http requests with no
keep-alive.
First, let me post my code for the case in which I try to request using
keep-alive.
<Placeholder for keepalive code attachment link>
With the code above, everything works great. All my requests are done one the
same connection and we get a nice graceful close with a couple FIN ACKs at the
end. The capture is here:
<Placeholder for keepalive capture attachment link>
However, when I try to do the same thing without using keepalive (I set
"Connection: close" in the httpclient and make sure I call close on the
httpclient as well at the end of each request), I see I the client send a reset
(RST) signal to the server at the end of the connection.
The code for the non keepalive test is here:
<Placeholder for no keepalive code attachment link>
And its capture is here:
<Placeholder for no keepalive capture attachment link>
I don't understand why the test with non persistent connections isn't
gracefully closing the connection as it does with the persistent use case by
sending a FIN,ACK to the server. It instead chooses to send a RST. Am I doing
something wrong?
I tried the same test for no keep-alive with our legacy code using the now
deprecated "commons-httpclient-3.1.jar" library. I see a proper connection
close there.
<Placeholder for no keepalive capture attachment for old httpclient link>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]