hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daz DeBoer <darrell.deb...@gradleware.com>
Subject Re: Problems with NTLM proxy authentication and SystemDefaultHttpClient
Date Mon, 17 Dec 2012 19:04:35 GMT
On 13 December 2012 09:24, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Wed, 2012-12-12 at 09:28 -0700, Daz DeBoer wrote:
>> Hi
>> First of all thanks for the great library. As a core Gradle developer,
>> I really appreciate the power and flexibility that comes with
>> HttpClient. (Gradle made the switch from java.net.URL based
>> downloading to using HttpClient over a year ago.)
>>
>> While it seems to work most of the time, occasionally we have users
>> who are not able to authenticate to a proxy using NTLM. (We are using
>> JCIFS-based NTLMEngine). At first I thought this was just a protocol
>> problem, but working with a user recently I'm not so sure.
>>
>> This user reports that they are able to authenticate to their proxy
>> over NTLM with test code using the DefaultHttpClient, but are not able
>> to using the SystemDefaultHttpClient after setting what look like the
>> correct properties. They are also unable to use Gradle to authenticate
>> to the proxy. Since Gradle is using the SystemDefaultHttpClient under
>> the covers, I'm interested in how this could make a difference, and
>> whether this could be the cause of this user's problems with Gradle.
>>
>> The relevant code and output is here:
>> ---------------------------------------------------------------
>>
>> Using org.apache.http.impl.client.DefaultHttpClient (working)
>> * Code : https://gist.github.com/77f7f4278612d38cb554
>> * Logs : https://gist.github.com/42057219f8903f3b92d2
>>
>> Using org.apache.http.impl.client.SystemDefaultHttpClient
>> * Code : https://gist.github.com/99f166b73f60176bab39
>> * Logs : https://gist.github.com/7f2c4af8b6532f8e9d0c
>>
>> The input proxy credentials are same for both the tests.
>> ----------------------------------------------------------------
>>
>> I've looked at the code/output but I'm not sure what could be causing
>> the differences. My suspicion is ProxySelectorRoutePlanner, but I
>> don't know how that could affect authentication. Any hints?
>>
>> Thanks
>
>
>
> Hi Daz
>
> I may have found the culprit. Could you please see if the
> 'http.keepAlive' system property on your system is set to anything other
> than 'true'?
>

The user has confirmed that NTLM authentication works correctly with
"http.keepAlive='true'". When we upgrade Gradle to HttpClient 4.3
we'll be sure to correct this issue.
Thanks again for helping us track this down, Oleg.

cheers
Daz

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message