hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: Problem with Preferences Architecture
Date Wed, 29 Sep 2004 09:28:50 GMT


Vikram Goyal wrote:

> Hello,
> 
> I am not sure if this is a bug or I am not running this right.
> 
> I am trying to get the preferences architecture to modify the http.useragent
> property at the client level, and then retrieve the value at the method and
> host level. The value gets percolated down to the Method level but the Host
> level value does not change and gives the global value. See code below.
> 
> As per the 3.0 B2 documentation, the Method and Host params should try and
> retrieve the value of the http.useragent from their local cache, and if it
> they do not find it, should go up the heirarchy, till they reach the global
> params. Since in the code below, the value is set at the Client level, one
> lower than the Global level, it should be retrieved from the Client level
> for both Method and Host params.
> 
> Regards,
> Vikram

The problem in your code is, that the host params are not set at all.
You should add something along the lines of:
host.setParams(new HostParams(client.getParams()));

Ortwin Glück
-- 
  _________________________________________________________________
  NOSE applied intelligence ag

  ortwin glück                      [www]      http://www.nose.ch
  software engineer
  hardturmstrasse 171               [pgp id]           0x81CF3416
  8005 zürich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12

---------------------------------------------------------------------
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