Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D53CEEC1D for ; Mon, 7 Jan 2013 10:18:03 +0000 (UTC) Received: (qmail 18917 invoked by uid 500); 7 Jan 2013 10:18:03 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 18752 invoked by uid 500); 7 Jan 2013 10:18:03 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 18709 invoked by uid 99); 7 Jan 2013 10:18:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 10:18:02 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [217.150.250.48] (HELO kalnich.nine.ch) (217.150.250.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 10:17:52 +0000 Received: from [192.168.1.121] (77-57-197-206.dclient.hispeed.ch [77.57.197.206]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by kalnich.nine.ch (Postfix) with ESMTPSA id 4205AB80152 for ; Mon, 7 Jan 2013 11:17:33 +0100 (CET) Message-ID: <1357553852.5013.51.camel@ubuntu> Subject: Re: The digest authentication doesn't work when using proxy From: Oleg Kalnichevski To: HttpClient User Discussion Date: Mon, 07 Jan 2013 11:17:32 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.0-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Sun, 2013-01-06 at 23:17 +0100, Bronislav Gabrhelik wrote: > Hello, > > > I came across the following issue. If I configure the HttpClient with > proxy(no-auth) then the digest authentication is failed by the server > with 400 Bad request. After short analysis I have found out that the > digest authentication request contains an absolute URI instead of a > relative URI.The absolute URI is set in the > DefaultRequestDirector.execute() by calling > of DefaultRequestDirector.rewriteRequestURI() in case the proxy is > configured. The parsed log from netmon is in the attachment. > > > Originally I have found the problem with my own Digest Authentication > Scheme (using Windows SSPI). After that I tried the build-in Digest > auth scheme and I was able to reproduce the issue. I noticed that the > request arg in the Schema.Authenticate is RequestWrapper, so i tried > to use RequestWrapper.getOriginal() for retrieving of URI, but I had n > o success. It returns also an absolute URI. > > > I believe it is a bug in the HttpClient. Besides that I would like to > address this problem in our DigestAuthScheme before it will be fixed > in the HttpClient. Bronislav Similar issue was reported in the past. I think HttpClient's behavior is correct and is compliant with the requirements of the HTTP specification. The problem is on the proxy side. For details please see: https://issues.apache.org/jira/browse/HTTPCLIENT-1071 Feel free to report this problem to developers of the proxy server. Oleg > Is there some consistent way how how to get relative URI from the > HttpRequest or HttpContext passed into authenticate() method? I know I > can use the URI class to get a relative path, but it seems just like a > workaround. > > > Environment: > JRE 1.6.0_23, Windows 7 SP1 > dependencies: > commons-codec-1.6.jar > commons-logging-1.1.1.jar > fluent-hc-4.2.2.jar > httpclient-4.2.2.jar > httpclient-cache-4.2.2.jar > httpcore-4.2.3.jar > httpmime-4.2.2.jar > > > Thanks, > Bronislav Gabrhelik > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org