hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: Posting XML over authenticated connection using SSL
Date Tue, 18 May 2004 13:12:30 GMT
I think the problem is that the realm is being specified.  Trying using 
null as the realm: httpState.setCredentials(null, "somehost", creds);

Mike


Lee Francis Wilhelmsen wrote:
>> Since you appear to be passing a custom HttpState object to the 
>> HttpClient#executeMethod these lines of code have no effect of what so 
>> ever on the method's execution
>>
>> client.getState().setAuthenticationPreemptive(true);
>> client.getState().setCredentials(realm, host, upc);
> 
>  >
> 
>> Try this instead
>>
>> httpState.setAuthenticationPreemptive(true);
>> httpState.setCredentials(realm, host, upc);
>> status = client.executeMethod(hostConfiguration, method, httpState);
>>
>> HTH
>>
>> Oleg
> 
> 
> Sorry, it seems I 've made a mistake when showing you my example code in 
>  my prevous mail. I'm calling
>     client.executeMethod(method);
> and not
>     client.executeMethod(hostConfiguration, method, httpState);
> in my code.
> 
> Don't understand why the Authorization header isn't being sent in the 
> first request as expected when setting setAuthenticationPreemptive(true)
> 
> Any ideas?
> 
> Regards
> Lee Francis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message