hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Original method parameters not copied in HttpMethodDirector.executeConnect()
Date Wed, 21 Jun 2006 08:26:28 GMT
On Wed, 2006-06-21 at 10:18 +0200, Olaf Sebelin wrote:
> Hi,
> 
> 
> in HttpMethodDirector.executeConnect() the parameters of the
> hostConfiguration are applied as default parameters to the new
> ConnnectMethod:
> 
>  this.connectMethod = new ConnectMethod();
>  this.connectMethod.getParams().setDefaults(this.hostConfiguration.getParams());
> 
> This way, the parameters of the underlying original Method are not
> copied to the ConnectMethod. 
> 
> So, if I set a method specific CredentialsProvider, like 
> 
>   GetMethod get = new GetMethod("https://somewhere.org"); //HTTPS!
>   get.getParams().setParameter(CredentialsProvider.PROVIDER, this);
> 
> it won't get applied to the ConnnectMethods parameters.
> 
> Is this desired behaviour, thus it is not correct to set the
> CredentialsProvider in a method-specific way?

Olaf,

As far as I am concerned this is a desired behavior. One can always set
parameters at the host or client level to make them apply to all methods
executed against the given host or by the same client.

Oleg


> 
> Or should  HttpMethodDirector.executeConnect() be changed to something
> like this (and I should file a bug report :)
> 
>  private boolean executeConnect(HttpMethod method) throws IOException, HttpException
>  {
>    this.connectMethod = new ConnectMethod();
>    this.connectMethod.setParams(method.getParams());
>    this.connectMethod.getParams().setDefaults(this.hostConfiguration.getParams());
>   //...
>  }
> 
> 
> Thanks for your help && Kind regards
> Olaf Sebelin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message