Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D41F718BD9 for ; Wed, 3 Jun 2015 18:45:43 +0000 (UTC) Received: (qmail 64603 invoked by uid 500); 3 Jun 2015 18:45:38 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 64562 invoked by uid 500); 3 Jun 2015 18:45:38 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 64551 invoked by uid 99); 3 Jun 2015 18:45:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2015 18:45:38 +0000 Date: Wed, 3 Jun 2015 18:45:38 +0000 (UTC) From: "Alan Silva (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPCLIENT-1655) HttpClient 4.4.1 sends RST instead of proper FIN ACK sequence when using non-persistance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alan Silva updated HTTPCLIENT-1655: ----------------------------------- Description: 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. [Java code for keepalive test with httpclient 4.4.1 GA | ^KeepAliveTest.java] 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: [Capture of keepalive test with httpclient 4.4.1 GA | ^POC_keep_alive_WITHOUT_class.pcap] 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: [Java code for no keepalive test with httpclient 4.4.1 GA | ^NoKeepAliveTest.java] And its capture is here: [Capture of no keepalive test with httpclient 4.4.1 GA |^POC_WITHOUT_keep_alive_WITHOUT_class.pcap] 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. [Capture of no keepalive test with commons-httpclient-3.1 |^old_code_mss.pcap] I've attached as much info as I can think of but if the wire logs or any other info is needed, I'd be more than happy to append it. was: 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. 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: [Capture of keepalive test with httpclient 4.4.1 GA | ^POC_keep_alive_WITHOUT_class.pcap] 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: And its capture is here: [Capture of no keepalive test with httpclient 4.4.1 GA |^POC_WITHOUT_keep_alive_WITHOUT_class.pcap] 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. [Capture of no keepalive test with commons-httpclient-3.1 |^old_code_mss.pcap] > HttpClient 4.4.1 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 > Attachments: KeepAliveTest.java, NoKeepAliveTest.java, POC_WITHOUT_keep_alive_WITHOUT_class.pcap, POC_keep_alive_WITHOUT_class.pcap, old_code_mss.pcap > > > 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. > [Java code for keepalive test with httpclient 4.4.1 GA | ^KeepAliveTest.java] > 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: > [Capture of keepalive test with httpclient 4.4.1 GA | ^POC_keep_alive_WITHOUT_class.pcap] > 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: > [Java code for no keepalive test with httpclient 4.4.1 GA | ^NoKeepAliveTest.java] > And its capture is here: > [Capture of no keepalive test with httpclient 4.4.1 GA |^POC_WITHOUT_keep_alive_WITHOUT_class.pcap] > 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. > [Capture of no keepalive test with commons-httpclient-3.1 |^old_code_mss.pcap] > I've attached as much info as I can think of but if the wire logs or any other info is needed, I'd be more than happy to append it. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org