Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 50770 invoked from network); 4 Nov 2009 14:31:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 14:31:56 -0000 Received: (qmail 16624 invoked by uid 500); 4 Nov 2009 14:31:55 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 16556 invoked by uid 500); 4 Nov 2009 14:31:55 -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 16546 invoked by uid 99); 4 Nov 2009 14:31:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 14:31:55 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 14:31:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5E8A6234C04C for ; Wed, 4 Nov 2009 06:31:32 -0800 (PST) Message-ID: <1187758393.1257345092382.JavaMail.jira@brutus> Date: Wed, 4 Nov 2009 14:31:32 +0000 (UTC) From: =?utf-8?Q?Ortwin_Gl=C3=BCck_=28JIRA=29?= To: dev@hc.apache.org Subject: [jira] Commented: (HTTPCLIENT-886) Incorrect handling of NoHttpResponseException in DefaultHttpMethodRetryHandler In-Reply-To: <739382851.1257338972954.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-886?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 12773493#action_12773493 ]=20 Ortwin Gl=C3=BCck commented on HTTPCLIENT-886: ----------------------------------------- NoHttpResponseException is only ever thrown (from readStatusLine()) after t= he response has been sent. So the conditon would never be true, actually. C= an we think of ANY scenario where retrying is the right thing to do when we= get no response from the server? > Incorrect handling of NoHttpResponseException in DefaultHttpMethodRetryHa= ndler > -------------------------------------------------------------------------= ----- > > Key: HTTPCLIENT-886 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-886 > Project: HttpComponents HttpClient > Issue Type: Bug > Affects Versions: 3.1 Final > Reporter: Sylvain Laurent > > We have a buggy load-balancer that sometimes forwards the request to the = back-end server, and then close the connections without returning any data = at all. > This provokes a NoHttpResponseException inside commons http client 3.1, w= hich is handled by DefaultHttpMethodRetryHandler. > Unfortunately DefaultHttpMethodRetryHandler handles this NoHttpResponseEx= ception by asking for a retry. In our case, this is very dangerous because = the request has already been sent and is being processed by the back-end se= rver. > I think that in the case of a NoHttpResponseException the test !method.is= RequestSent() shoud be done : > if (exception instanceof NoHttpResponseException && !method.isReq= uestSent()) { > // Retry if the server dropped connection on us AND the reque= st was not sent > return true; > } --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org