[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: Proxy-Authorization header received on server side
From:       Oleg Kalnichevski <olegk () apache ! org>
Date:       2011-02-24 15:59:00
Message-ID: 1298563140.6331.35.camel () ubuntu
[Download RAW message or body]

On Thu, 2011-02-24 at 10:15 +0100, Onofer Dusan wrote:
> Hi,
> 
> I'm following example 
> http://hc.apache.org/httpcomponents-client-ga/examples.html
> Proxy authentication
> 
> but it seems that not only proxy is receiving credentials for proxy.
> In log, which is generated at target.host I can see header
> Proxy-Authorization: Basic ....
> 		
>   httpclient.getCredentialsProvider().setCredentials(
>     new AuthScope("proxy.host", 80),
>     new UsernamePasswordCredentials("proxy_user", "proxy_pass"));
>   List<String> authpref = new ArrayList<String>();
>   authpref.add(AuthPolicy.BASIC);
>   httpclient.getParams().setParameter(AuthPNames.PROXY_AUTH_PREF, authpref);
> 
>   HttpHost targetHost = new HttpHost("target.host", 443, "https");
>   HttpHost proxy = new HttpHost("proxy.host", 80);
> 
>   httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
>   HttpGet httpget = new HttpGet("/path/logrequest.php");
>   HttpResponse response = httpclient.execute(targetHost, httpget);
> 
> I'm using httpclient-4.1.

This sounds like a serious bug in HttpClient. Please raise a JIRA for
this defect and set its priority to critical.

Oleg



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic