You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Alan Yu <ak...@rogers.com> on 2006/02/28 00:05:44 UTC
https proxy authentication error
Hi all,
Why the second executeMethod will still get 407?
Thanks.
Alan
=================
HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setProxy("some_proxy",
8443);
GetMethod httpget = new
GetMethod("https://www.verisign.com/");
try {
int rc = httpclient.executeMethod(httpget);
switch (rc) {
case
HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
httpclient.getState().setProxyCredentials(AuthScope.ANY,
new
UsernamePasswordCredentials("some_id",
"some_password"));
int rc2 = httpclient.executeMethod(httpget);
System.out.println(rc2);
break;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
httpget.releaseConnection();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Oleg Kalnichevski <ol...@apache.org>.
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:akwyu@rogers.com]
> 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:olegk@apache.org]
> 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
>
>
> > -----Original Message-----
> > From: Roland Weber [mailto:http-async@dubioso.net]
> > Sent: March 1, 2006 12:48 PM
> > To: HttpClient User Discussion
> > Subject: Re: https proxy authentication error
> >
> > Hi Alan,
> >
> > > Why the second executeMethod will still get 407?
> >
> > Because you didn't enable preemptive authentication, or any
> > authentication at all for that matter. Please take the time to study
> > our Authentication
> > Guide:
> >
> > http://jakarta.apache.org/commons/httpclient/authentication.html
> >
> > cheers,
> > Roland
> >
> > > =================
> > > HttpClient httpclient = new HttpClient();
> > > httpclient.getHostConfiguration().setProxy("some_proxy",
> > > 8443);
> > > GetMethod httpget = new
> > > GetMethod("https://www.verisign.com/");
> > > try {
> > > int rc = httpclient.executeMethod(httpget);
> > > switch (rc) {
> > > case
> > > HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
> > >
> > > httpclient.getState().setProxyCredentials(AuthScope.ANY,
> > > new
> > > UsernamePasswordCredentials("some_id",
> > > "some_password"));
> > >
> > > int rc2 = httpclient.executeMethod(httpget);
> > > System.out.println(rc2);
> > > break;
> > > }
> > > } catch (Exception e) {
> > > e.printStackTrace();
> > > } finally {
> > > httpget.releaseConnection();
> > > }
> > >
> > >
> > > --------------------------------------------------------------------
> > > - 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
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2006-05-08 at 11:15 -0400, Alan Yu wrote:
> I am using HttpClient in a commercial product. It will be difficult to
> convince my boss that why I have to use a daily build but not using an
> official release.
>
Well, that's what open-source is all about. Just get the 3.0.1 source
distribution, patch one file, recompile, package and live happily ever
after.
I can cut a semi-official 3.0.1 + 38818 build and sign if with my
private key especially for your boss, if though it was a fully official
HttpClient release, if that helps.
However, what difference does it make at the end of the day, if a
release is built by some Russian guy with a funny Polish name who is
supposedly associated with the Apache Software Foundation or by a
trusted employee of your company? The underlying code is still
open-source and is provided without a warranty of any kind.
Oleg
> Anyway, I totally appreciate the effort spent by whom contribute to this
> project.
>
> Alan
>
>
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: May 8, 2006 11:01 AM
> To: HttpClient User Discussion
> Subject: RE: https proxy authentication error
>
> On Mon, 2006-05-08 at 10:35 -0400, Alan Yu wrote:
> > But what is the target date of 3.1?
>
> The 3.1 ALPHA1 is slated for release in June. I do not expect 3.1 FINAL
> sooner than Dec 2006.
>
> > Would it be several months away?
> > We can't do a 3.0.2 build?
> >
>
> Cutting a release is a tedious and time consuming operation, which usually
> takes up to a full working day to do properly. 8 hours worth of work is _a
> lot_ for an open-source project. I would very much prefer to have all this
> time invested into work toward the 3.1 release.
>
> On the other hand, the fix for 38818 is a trivial one liner patch. It should
> not be that difficult to apply.
>
> Oleg
>
> >
> > -----Original Message-----
> > From: Oleg Kalnichevski [mailto:olegk@apache.org]
> > Sent: May 8, 2006 10:29 AM
> > To: HttpClient User Discussion
> > Subject: RE: https proxy authentication error
> >
> > On Mon, 2006-05-08 at 10:10 -0400, Alan Yu wrote:
> > > Is there a reason why the fix for 38818 does not make into 3.0.1?
> > > I am eagerly waiting for the fix to be in an official build.
> > >
> >
> > Oh boy, I feel stupid. I just realized I had forgotten to apply the
> > patch to the HTTPCLIENT_3_0_BRANCH. Actually bug 38818 was the only
> > reason to release
> > 3.0.1 in the first place, as all other bugs were fairly minor.
> >
> > I am really sorry about that, Alan. Now it will have to wait until 3.1.
> > The bug is not severe enough to call an emergency release for.
> >
> > Oleg
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Alan Yu <ak...@rogers.com>.
I am using HttpClient in a commercial product. It will be difficult to
convince my boss that why I have to use a daily build but not using an
official release.
Anyway, I totally appreciate the effort spent by whom contribute to this
project.
Alan
-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org]
Sent: May 8, 2006 11:01 AM
To: HttpClient User Discussion
Subject: RE: https proxy authentication error
On Mon, 2006-05-08 at 10:35 -0400, Alan Yu wrote:
> But what is the target date of 3.1?
The 3.1 ALPHA1 is slated for release in June. I do not expect 3.1 FINAL
sooner than Dec 2006.
> Would it be several months away?
> We can't do a 3.0.2 build?
>
Cutting a release is a tedious and time consuming operation, which usually
takes up to a full working day to do properly. 8 hours worth of work is _a
lot_ for an open-source project. I would very much prefer to have all this
time invested into work toward the 3.1 release.
On the other hand, the fix for 38818 is a trivial one liner patch. It should
not be that difficult to apply.
Oleg
>
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: May 8, 2006 10:29 AM
> To: HttpClient User Discussion
> Subject: RE: https proxy authentication error
>
> On Mon, 2006-05-08 at 10:10 -0400, Alan Yu wrote:
> > Is there a reason why the fix for 38818 does not make into 3.0.1?
> > I am eagerly waiting for the fix to be in an official build.
> >
>
> Oh boy, I feel stupid. I just realized I had forgotten to apply the
> patch to the HTTPCLIENT_3_0_BRANCH. Actually bug 38818 was the only
> reason to release
> 3.0.1 in the first place, as all other bugs were fairly minor.
>
> I am really sorry about that, Alan. Now it will have to wait until 3.1.
> The bug is not severe enough to call an emergency release for.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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
RE: https proxy authentication error
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2006-05-08 at 10:35 -0400, Alan Yu wrote:
> But what is the target date of 3.1?
The 3.1 ALPHA1 is slated for release in June. I do not expect 3.1 FINAL
sooner than Dec 2006.
> Would it be several months away?
> We can't do a 3.0.2 build?
>
Cutting a release is a tedious and time consuming operation, which
usually takes up to a full working day to do properly. 8 hours worth of
work is _a lot_ for an open-source project. I would very much prefer to
have all this time invested into work toward the 3.1 release.
On the other hand, the fix for 38818 is a trivial one liner patch. It
should not be that difficult to apply.
Oleg
>
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org]
> Sent: May 8, 2006 10:29 AM
> To: HttpClient User Discussion
> Subject: RE: https proxy authentication error
>
> On Mon, 2006-05-08 at 10:10 -0400, Alan Yu wrote:
> > Is there a reason why the fix for 38818 does not make into 3.0.1?
> > I am eagerly waiting for the fix to be in an official build.
> >
>
> Oh boy, I feel stupid. I just realized I had forgotten to apply the patch to
> the HTTPCLIENT_3_0_BRANCH. Actually bug 38818 was the only reason to release
> 3.0.1 in the first place, as all other bugs were fairly minor.
>
> I am really sorry about that, Alan. Now it will have to wait until 3.1.
> The bug is not severe enough to call an emergency release for.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Alan Yu <ak...@rogers.com>.
But what is the target date of 3.1? Would it be several months away?
We can't do a 3.0.2 build?
-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org]
Sent: May 8, 2006 10:29 AM
To: HttpClient User Discussion
Subject: RE: https proxy authentication error
On Mon, 2006-05-08 at 10:10 -0400, Alan Yu wrote:
> Is there a reason why the fix for 38818 does not make into 3.0.1?
> I am eagerly waiting for the fix to be in an official build.
>
Oh boy, I feel stupid. I just realized I had forgotten to apply the patch to
the HTTPCLIENT_3_0_BRANCH. Actually bug 38818 was the only reason to release
3.0.1 in the first place, as all other bugs were fairly minor.
I am really sorry about that, Alan. Now it will have to wait until 3.1.
The bug is not severe enough to call an emergency release for.
Oleg
---------------------------------------------------------------------
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
RE: https proxy authentication error
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2006-05-08 at 10:10 -0400, Alan Yu wrote:
> Is there a reason why the fix for 38818 does not make into 3.0.1?
> I am eagerly waiting for the fix to be in an official build.
>
Oh boy, I feel stupid. I just realized I had forgotten to apply the
patch to the HTTPCLIENT_3_0_BRANCH. Actually bug 38818 was the only
reason to release 3.0.1 in the first place, as all other bugs were
fairly minor.
I am really sorry about that, Alan. Now it will have to wait until 3.1.
The bug is not severe enough to call an emergency release for.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Alan Yu <ak...@rogers.com>.
Is there a reason why the fix for 38818 does not make into 3.0.1?
I am eagerly waiting for the fix to be in an official build.
-----Original Message-----
From: Alan Yu [mailto:akwyu@rogers.com]
Sent: March 4, 2006 9:35 AM
To: 'HttpClient User Discussion'
Subject: RE: https proxy authentication error
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
-----Original Message-----
From: Alan Yu [mailto:akwyu@rogers.com]
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:olegk@apache.org]
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
> -----Original Message-----
> From: Roland Weber [mailto:http-async@dubioso.net]
> Sent: March 1, 2006 12:48 PM
> To: HttpClient User Discussion
> Subject: Re: https proxy authentication error
>
> Hi Alan,
>
> > Why the second executeMethod will still get 407?
>
> Because you didn't enable preemptive authentication, or any
> authentication at all for that matter. Please take the time to study
> our Authentication
> Guide:
>
> http://jakarta.apache.org/commons/httpclient/authentication.html
>
> cheers,
> Roland
>
> > =================
> > HttpClient httpclient = new HttpClient();
> > httpclient.getHostConfiguration().setProxy("some_proxy",
> > 8443);
> > GetMethod httpget = new
> > GetMethod("https://www.verisign.com/");
> > try {
> > int rc = httpclient.executeMethod(httpget);
> > switch (rc) {
> > case
> > HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
> >
> > httpclient.getState().setProxyCredentials(AuthScope.ANY,
> > new
> > UsernamePasswordCredentials("some_id",
> > "some_password"));
> >
> > int rc2 = httpclient.executeMethod(httpget);
> > System.out.println(rc2);
> > break;
> > }
> > } catch (Exception e) {
> > e.printStackTrace();
> > } finally {
> > httpget.releaseConnection();
> > }
> >
> >
> > --------------------------------------------------------------------
> > - 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
>
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Alan Yu <ak...@rogers.com>.
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
-----Original Message-----
From: Alan Yu [mailto:akwyu@rogers.com]
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:olegk@apache.org]
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
> -----Original Message-----
> From: Roland Weber [mailto:http-async@dubioso.net]
> Sent: March 1, 2006 12:48 PM
> To: HttpClient User Discussion
> Subject: Re: https proxy authentication error
>
> Hi Alan,
>
> > Why the second executeMethod will still get 407?
>
> Because you didn't enable preemptive authentication, or any
> authentication at all for that matter. Please take the time to study
> our Authentication
> Guide:
>
> http://jakarta.apache.org/commons/httpclient/authentication.html
>
> cheers,
> Roland
>
> > =================
> > HttpClient httpclient = new HttpClient();
> > httpclient.getHostConfiguration().setProxy("some_proxy",
> > 8443);
> > GetMethod httpget = new
> > GetMethod("https://www.verisign.com/");
> > try {
> > int rc = httpclient.executeMethod(httpget);
> > switch (rc) {
> > case
> > HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
> >
> > httpclient.getState().setProxyCredentials(AuthScope.ANY,
> > new
> > UsernamePasswordCredentials("some_id",
> > "some_password"));
> >
> > int rc2 = httpclient.executeMethod(httpget);
> > System.out.println(rc2);
> > break;
> > }
> > } catch (Exception e) {
> > e.printStackTrace();
> > } finally {
> > httpget.releaseConnection();
> > }
> >
> >
> > --------------------------------------------------------------------
> > - 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
>
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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
RE: https proxy authentication error
Posted by Alan Yu <ak...@rogers.com>.
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:olegk@apache.org]
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
> -----Original Message-----
> From: Roland Weber [mailto:http-async@dubioso.net]
> Sent: March 1, 2006 12:48 PM
> To: HttpClient User Discussion
> Subject: Re: https proxy authentication error
>
> Hi Alan,
>
> > Why the second executeMethod will still get 407?
>
> Because you didn't enable preemptive authentication, or any
> authentication at all for that matter. Please take the time to study
> our Authentication
> Guide:
>
> http://jakarta.apache.org/commons/httpclient/authentication.html
>
> cheers,
> Roland
>
> > =================
> > HttpClient httpclient = new HttpClient();
> > httpclient.getHostConfiguration().setProxy("some_proxy",
> > 8443);
> > GetMethod httpget = new
> > GetMethod("https://www.verisign.com/");
> > try {
> > int rc = httpclient.executeMethod(httpget);
> > switch (rc) {
> > case
> > HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
> >
> > httpclient.getState().setProxyCredentials(AuthScope.ANY,
> > new
> > UsernamePasswordCredentials("some_id",
> > "some_password"));
> >
> > int rc2 = httpclient.executeMethod(httpget);
> > System.out.println(rc2);
> > break;
> > }
> > } catch (Exception e) {
> > e.printStackTrace();
> > } finally {
> > httpget.releaseConnection();
> > }
> >
> >
> > --------------------------------------------------------------------
> > - 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
>
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: https proxy authentication error
Posted by Oleg Kalnichevski <ol...@apache.org>.
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
> -----Original Message-----
> From: Roland Weber [mailto:http-async@dubioso.net]
> Sent: March 1, 2006 12:48 PM
> To: HttpClient User Discussion
> Subject: Re: https proxy authentication error
>
> Hi Alan,
>
> > Why the second executeMethod will still get 407?
>
> Because you didn't enable preemptive authentication, or any authentication
> at all for that matter. Please take the time to study our Authentication
> Guide:
>
> http://jakarta.apache.org/commons/httpclient/authentication.html
>
> cheers,
> Roland
>
> > =================
> > HttpClient httpclient = new HttpClient();
> > httpclient.getHostConfiguration().setProxy("some_proxy",
> > 8443);
> > GetMethod httpget = new
> > GetMethod("https://www.verisign.com/");
> > try {
> > int rc = httpclient.executeMethod(httpget);
> > switch (rc) {
> > case
> > HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
> >
> > httpclient.getState().setProxyCredentials(AuthScope.ANY,
> > new
> > UsernamePasswordCredentials("some_id",
> > "some_password"));
> >
> > int rc2 = httpclient.executeMethod(httpget);
> > System.out.println(rc2);
> > break;
> > }
> > } catch (Exception e) {
> > e.printStackTrace();
> > } finally {
> > httpget.releaseConnection();
> > }
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
> ---------------------------------------------------------------------
> 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
RE: https proxy authentication error
Posted by Alan Yu <ak...@rogers.com>.
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
-----Original Message-----
From: Roland Weber [mailto:http-async@dubioso.net]
Sent: March 1, 2006 12:48 PM
To: HttpClient User Discussion
Subject: Re: https proxy authentication error
Hi Alan,
> Why the second executeMethod will still get 407?
Because you didn't enable preemptive authentication, or any authentication
at all for that matter. Please take the time to study our Authentication
Guide:
http://jakarta.apache.org/commons/httpclient/authentication.html
cheers,
Roland
> =================
> HttpClient httpclient = new HttpClient();
> httpclient.getHostConfiguration().setProxy("some_proxy",
> 8443);
> GetMethod httpget = new
> GetMethod("https://www.verisign.com/");
> try {
> int rc = httpclient.executeMethod(httpget);
> switch (rc) {
> case
> HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
>
> httpclient.getState().setProxyCredentials(AuthScope.ANY,
> new
> UsernamePasswordCredentials("some_id",
> "some_password"));
>
> int rc2 = httpclient.executeMethod(httpget);
> System.out.println(rc2);
> break;
> }
> } catch (Exception e) {
> e.printStackTrace();
> } finally {
> httpget.releaseConnection();
> }
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: https proxy authentication error
Posted by Roland Weber <ht...@dubioso.net>.
Hi Alan,
> Why the second executeMethod will still get 407?
Because you didn't enable preemptive authentication,
or any authentication at all for that matter. Please
take the time to study our Authentication Guide:
http://jakarta.apache.org/commons/httpclient/authentication.html
cheers,
Roland
> =================
> HttpClient httpclient = new HttpClient();
> httpclient.getHostConfiguration().setProxy("some_proxy",
> 8443);
> GetMethod httpget = new
> GetMethod("https://www.verisign.com/");
> try {
> int rc = httpclient.executeMethod(httpget);
> switch (rc) {
> case
> HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
>
> httpclient.getState().setProxyCredentials(AuthScope.ANY,
> new
> UsernamePasswordCredentials("some_id",
> "some_password"));
>
> int rc2 = httpclient.executeMethod(httpget);
> System.out.println(rc2);
> break;
> }
> } catch (Exception e) {
> e.printStackTrace();
> } finally {
> httpget.releaseConnection();
> }
>
>
> ---------------------------------------------------------------------
> 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