Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA295E847 for ; Sat, 9 Mar 2013 09:47:23 +0000 (UTC) Received: (qmail 10059 invoked by uid 500); 9 Mar 2013 09:47:23 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 10023 invoked by uid 500); 9 Mar 2013 09:47:23 -0000 Mailing-List: contact commits-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 commits@hc.apache.org Received: (qmail 10009 invoked by uid 99); 9 Mar 2013 09:47:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Mar 2013 09:47:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Mar 2013 09:47:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4660C2388A6C for ; Sat, 9 Mar 2013 09:47:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1454680 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java Date: Sat, 09 Mar 2013 09:47:00 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130309094700.4660C2388A6C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Sat Mar 9 09:46:59 2013 New Revision: 1454680 URL: http://svn.apache.org/r1454680 Log: Minor tweak to debug log message Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java?rev=1454680&r1=1454679&r2=1454680&view=diff ============================================================================== --- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java (original) +++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java Sat Mar 9 09:46:59 2013 @@ -112,9 +112,9 @@ public class ProtocolExec implements Cli // Get user info from the URI final AuthState targetAuthState = context.getTargetAuthState(); if (targetAuthState != null) { - final URI uri = request.getURI(); - if (uri != null) { - final String userinfo = uri.getUserInfo(); + final URI requestURI = request.getURI(); + if (requestURI != null) { + final String userinfo = requestURI.getUserInfo(); if (userinfo != null) { targetAuthState.update(new BasicScheme(), new UsernamePasswordCredentials( userinfo)); @@ -151,8 +151,11 @@ public class ProtocolExec implements Cli final String uriString = original.getRequestLine().getUri(); try { uri = URI.create(uriString); - } catch (IllegalArgumentException e) { - log.debug("Could not parse " + uriString + " as a URI to set Host header"); + } catch (final IllegalArgumentException ex) { + if (this.log.isDebugEnabled()) { + this.log.debug("Unable to parse '" + uriString + "' as a valid URI; " + + "request URI and Host header may be inconsistent", ex); + } } }