Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 13713 invoked from network); 21 Jun 2006 08:26:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2006 08:26:52 -0000 Received: (qmail 36778 invoked by uid 500); 21 Jun 2006 08:26:51 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 36763 invoked by uid 500); 21 Jun 2006 08:26:51 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 36752 invoked by uid 99); 21 Jun 2006 08:26:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 01:26:51 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.186.18.66] (HELO mail21.bluewin.ch) (195.186.18.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 01:26:50 -0700 Received: from [192.168.0.3] (62.203.15.27) by mail21.bluewin.ch (Bluewin 7.3.110.2) id 449253F30013EBA9 for httpclient-user@jakarta.apache.org; Wed, 21 Jun 2006 08:26:30 +0000 Subject: Re: Original method parameters not copied in HttpMethodDirector.executeConnect() From: Oleg Kalnichevski To: HttpClient User Discussion In-Reply-To: <20060621101803.19505a35@zaphod> References: <20060621101803.19505a35@zaphod> Content-Type: text/plain Date: Wed, 21 Jun 2006 10:26:28 +0200 Message-Id: <1150878388.4944.11.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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