On Wed, 2012-02-29 at 17:19 +0000, Thomas Vestergaard wrote:
> Hi,
> 
> When setting the virtual host parameter (ClientPNames.VIRTUAL_HOST) on a 
> client, it has no affect on actual virtual host used when the client executes 
> requests. It only looks at the parameters from the request object.
> 
> In version 4.2.Alpha1 this is handled in line 408-414 in 
> org.apache.http.impl.client.DefaultRequestDirector.execute
> 
> HttpRequest orig = request;
> RequestWrapper origWrapper = wrapRequest(orig);
> origWrapper.setParams(params);
> HttpRoute origRoute = determineRoute(target, origWrapper, context);
> 
> virtualHost = (HttpHost) orig.getParams().getParameter(
>         ClientPNames.VIRTUAL_HOST);
> 
> Is this by design? Or is this a bug?
> 

This does look like a bug. Please raise a JIRA for this issue.

> A possible solution would be to merge the two collections of parameters, but 
> I expect, that some there needs to be a common understanding around which 
> takes priority - parameters on client or request.
> 

Request level parameters always take precedence those set at the client
level.

Oleg 

>  Best regards,
> Telenor
> 
> Thomas Vestergaard
> Ekstern konsulent
> Technology
> Frederikskaj, DK-1780. København V
> Tel: +45 52 18 92 18  // e-mail: [email protected]<mailto:[email protected]>
> Web: http://www.telenor.dk<http://www.telenor.dk/>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to