Thank Alan,

The commons-httpclient-20060307.zip is no more available for download.
I try with commons-httpclient-20060317.zip and I have the same problem.

Here is the test.

ProxyClient proxyClient = new ProxyClient();
proxyClient.getParams().setAuthenticationPreemptive(true) ;
                
HostConfiguration hostConfiguration =proxyClient.getHostConfiguration();
hostConfiguration.setHost("myhost", 443);
hostConfiguration.setProxy("myproxy", 8080) ;
                
Credentials userCredential = new UsernamePasswordCredentials("mylogin", "password") ; proxyClient.getState().setProxyCredentials(new AuthScope("myproxy", 8080, AuthScope.ANY_REALM), userCredential) ;

ProxyClient.ConnectResponse response = proxyClient.connect();
                
if (response.getSocket() == null) {
throw new IOException("Connection through proxy could not be opened");
                }

This work fine. but if I try to use HTTPS by changing the ligne

hostConfiguration.setHost("myhost", 443);

by

hostConfiguration.setHost("myhost", 443, "https");
or
hostConfiguration.setHost("myhost", 443, new Protocol("https", new SSLProtocolSocketFactory(), 443));


it does not works anymore: there is a proxy authentification error (2 errors 407) while mode preemptive is activate.

Any idea?


Alan Yu wrote:
The patch is in commons-httpclient-20060307.zip

-----Original Message-----
From: Thierry Sechao [mailto:[EMAIL PROTECTED] Sent: March 17, 2006 1:08 PM
To: Apache HTTP Client Mailing List
Subject: https proxy authentication error


Hi,

I have the same problem report by Alan, using ProxyClient.
is the patch available?

Thanks


On Sat, 2006-03-04 at 09:34 -0500, Alan Yu wrote:
 > When will the fix be available?
 > I don't see the change in
 >
http://svn.apache.org/builds/jakarta-commons/nightly/commons-httpclient/comm
 > ons-httpclient-src-20060304.zip
 >
 > Alan
 >

Alan,
I'll check the patch in as soon as it gets approved by at least another
committer

Oleg


 > -----Original Message-----
 > From: Alan Yu [mailto:[EMAIL PROTECTED]  > Sent: March 2, 2006 11:41 AM

To: 'HttpClient User Discussion'

 > Subject: RE: https proxy authentication error  >  > I find out that if I
use a MultiThreadedHttpConnectionManager, the second  > executeMethod can
return 200 for https site.
 > I hope this will give you extra information for your fix.
 >
 > Alan
 >
 >
 > -----Original Message-----
 > From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED]  > Sent: March 1, 2006
5:38 PM  > To: HttpClient User Discussion  > Subject: RE: https proxy
authentication error  >  > On Wed, 2006-03-01 at 17:14 -0500, Alan Yu wrote:
 > > What I don't understand is if I run the same code against the http  > >
port 8080 on the same proxy server with URL http://www.verisign.com/,  > >
the second executeMethod can return 200 OK.
 > >
 > > Does preemptive authentication have anything to do with whether the  >

app is using http or https?

 > >
 > >
 > > Alan
 > >
 > >
 >
 > Alan,
 > You are likely to have run into the same problem as the one reported  >
here:
 > http://issues.apache.org/bugzilla/show_bug.cgi?id=38818
 >
 > I'll post a fix tomorrow
 >
 > Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to