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 Mark Claassen <mc...@ocie.net> on 2007/01/19 16:44:44 UTC
HttpClient, SOCKS proxy, and webstart
I have been having some trouble with HttpClient and the SOCKS proxy. My
path to where I am now is a long and sorted tale, so here is my summary:
Webstart gets its proxy settings from the Windows default browser
Have IE 7 be the default browser and set the proxy manually for all
protocols (including SOCKS)
Run a webstart program that connects to anywhere ("http://java.sun.com" for
instance)
java.net.SocketException: Reply from SOCKS server has bad version
at java.net.SocksSocketImpl.connectV4(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSo
cket(Unknown Source)
Now, in IE 7, check the box in the proxy settings to "Use same proxy for all
protocols"
This will actually cause IE to *clear* the SOCKS proxy box and the webstart
program will work.
Firefox, on the other hand, does not clear the SOCKS field when the
analogous check box is checked, cause HttpClient to fail to connect as
above. This is the real problem and how I discovered it. Since I use
Firefox, when I tested my Proxy, HttpClient failed...in a way it would not
have if I was using IE. (I am assuming that most users will just check the
"Use same proxy for all protocols" in both browsers.)
I am not sure if this is a bug in Firefox, in the default SocketFactory, or
in HttpClient. What I want to know is how to work around this. I really
like HttpClient, but I am starting to get worried that as Firefox takes off
more and more, this is going to bite me.
P.S.
HttpURLConnection seems to create its sockets from sun.net.NetworkClient and
not a SocketFactory, which apparently makes it immune to this problem
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: HttpClient, SOCKS proxy, and webstart
Posted by Mark Claassen <mc...@ocie.net>.
I have some additional information on this.
As it turns out this does NOT really happen in 5.0 as I said in the report.
It can happen, but probably won't in realistic scenarios.
Webstart 5.0 reads its proxy settings from IE *always*, whether or not it is
the default. Because of this, the behavior of the IE (to clear this field)
prevents this issue from happening. Webstart 6.0 checks the default
browser's settings. If the default browser is Firefox, which does not clear
the SOCKS proxy setting, connections will fail.
Mark
-----Original Message-----
From: Mark Claassen [mailto:mclaassen@ocie.net]
Sent: Friday, January 19, 2007 10:45 AM
To: httpclient-user@jakarta.apache.org
Subject: HttpClient, SOCKS proxy, and webstart
I have been having some trouble with HttpClient and the SOCKS proxy. My
path to where I am now is a long and sorted tale, so here is my summary:
Webstart gets its proxy settings from the Windows default browser
Have IE 7 be the default browser and set the proxy manually for all
protocols (including SOCKS) Run a webstart program that connects to anywhere
("http://java.sun.com" for
instance)
java.net.SocketException: Reply from SOCKS server has bad version
at java.net.SocksSocketImpl.connectV4(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSo
cket(Unknown Source)
Now, in IE 7, check the box in the proxy settings to "Use same proxy for all
protocols"
This will actually cause IE to *clear* the SOCKS proxy box and the webstart
program will work.
Firefox, on the other hand, does not clear the SOCKS field when the
analogous check box is checked, cause HttpClient to fail to connect as
above. This is the real problem and how I discovered it. Since I use
Firefox, when I tested my Proxy, HttpClient failed...in a way it would not
have if I was using IE. (I am assuming that most users will just check the
"Use same proxy for all protocols" in both browsers.)
I am not sure if this is a bug in Firefox, in the default SocketFactory, or
in HttpClient. What I want to know is how to work around this. I really
like HttpClient, but I am starting to get worried that as Firefox takes off
more and more, this is going to bite me.
P.S.
HttpURLConnection seems to create its sockets from sun.net.NetworkClient and
not a SocketFactory, which apparently makes it immune to this problem
Thanks,
Mark
---------------------------------------------------------------------
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: HttpClient, SOCKS proxy, and webstart
Posted by Roland Weber <RO...@de.ibm.com>.
Hi Mark,
> Checking the checkbox in Firefox to have all the proxies use the same
host
> and port sets up the HTTP proxy and the SOCKS proxy to use the same host
and
> port. Is this a valid configuration? It seems that SOCKS and HTTP work
on
> different levels of the TCP stack, so their proxies would as well.
On the client side, they're on different levels. But a proxy can switch
behavior to provide proxy services on different levels. There will always
be a plain socket connection to the proxy first. If the incoming data
starts with "HTTP", it's an HTTP request. If it starts with 0x05, it's
probably a SOCKS 5 request. Think of a firewall/router with built-in proxy
functionality.
Nevertheless you can discuss with the Firefox guys how to improve their
interaction with Java WebStart.
cheers,
Roland
RE: HttpClient, SOCKS proxy, and webstart
Posted by Mark Claassen <mc...@ocie.net>.
I am having trouble finding any definitive information on this from the web.
I am thinking that this issue comes the fact that Firefox sets up the proxy
servers incorrectly.
Checking the checkbox in Firefox to have all the proxies use the same host
and port sets up the HTTP proxy and the SOCKS proxy to use the same host and
port. Is this a valid configuration? It seems that SOCKS and HTTP work on
different levels of the TCP stack, so their proxies would as well.
Therefore, forcing them to be the same would never be valid. Can anyone
help shed some light on this for me?
Mark
-----Original Message-----
From: Roland Weber [mailto:http-async@dubioso.net]
Sent: Friday, January 26, 2007 4:58 PM
To: HttpClient User Discussion
Subject: Re: HttpClient, SOCKS proxy, and webstart
Mark Claassen wrote:
> Well, I have some good news for you.
>
> Just running the JRE (like through an IDE) the
> ProxySelector.getDefault() gives a ProxySelector class or
> sun.net.spi.DefaultProxySelector Running through webstart gives class
> a ProxySelector class of com.sun.deploy.net.proxy.DeployProxySelector
Ah yes, thanks for reminding me. You're on 5.0 or later, which has the
ProxySelector class. I stumbled over that one before, when I did some
digging for the Application Design FAQ:
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQu
estions#head-b97e4a161e34e2f9ecefa891cdb92bb0a09e6746
I'm still working in 1.4 environments, so I keep forgetting (or avoid
getting used to) the newer features.
I'm glad you solved your problems!
cheers,
Roland
---------------------------------------------------------------------
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: HttpClient, SOCKS proxy, and webstart
Posted by Roland Weber <ht...@dubioso.net>.
Mark Claassen wrote:
> Well, I have some good news for you.
>
> Just running the JRE (like through an IDE) the ProxySelector.getDefault()
> gives a ProxySelector class or sun.net.spi.DefaultProxySelector
> Running through webstart gives class a ProxySelector class of
> com.sun.deploy.net.proxy.DeployProxySelector
Ah yes, thanks for reminding me. You're on 5.0 or later, which has the
ProxySelector class. I stumbled over that one before, when I did some
digging for the Application Design FAQ:
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQuestions#head-b97e4a161e34e2f9ecefa891cdb92bb0a09e6746
I'm still working in 1.4 environments, so I keep forgetting
(or avoid getting used to) the newer features.
I'm glad you solved your problems!
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: HttpClient, SOCKS proxy, and webstart
Posted by Mark Claassen <mc...@ocie.net>.
Apparently I was not on the roll I thought I was. I forgot to test my
SocketFactory in webstart. It still works in webstart, but I get the same
SOCKS issue that I did before. sun.net.Network client creates a Socket via
new Socket(Proxy.NO_PROXY) if the proxy type is not a SOCKS proxy. Using
this constructor, everything works.
-----Original Message-----
From: Mark Claassen [mailto:mclaassen@ocie.net]
Sent: Tuesday, January 23, 2007 2:13 PM
To: 'HttpClient User Discussion'
Subject: RE: HttpClient, SOCKS proxy, and webstart
I feel as if I am on a bit of a roll, so I went ahead and tried my own
socket factory. Is this all I need to do? Is the connection timeout all I
need to worry about here? Granted, I may be making my app not work with a
SOCKS proxy, but does anyone use SOCKS anymore?
public class MySocketFactory implements ProtocolSocketFactory {
public MySocketFactory() {
}
public Socket createSocket(String host, int port) throws
IOException, UnknownHostException {
return new Socket(host,port);
}
public Socket createSocket(String host, int port, InetAddress
localAddress, int localPort) throws IOException, UnknownHostException {
return new Socket(host,port,localAddress,localPort);
}
public Socket createSocket(String host, int port, InetAddress
localAddress, int localPort, HttpConnectionParams params) throws
IOException, UnknownHostException, ConnectTimeoutException {
Socket rval;
if (params == null) {
throw new IllegalArgumentException("Parameters may
not be null");
}
int timeout = params.getConnectionTimeout();
if (timeout == 0) {
rval = new Socket(host, port, localAddress,
localPort);
}
else {
rval = new Socket();
SocketAddress localaddr = new
InetSocketAddress(localAddress, localPort);
SocketAddress remoteaddr = new
InetSocketAddress(host, port);
rval.bind(localaddr);
rval.connect(remoteaddr, timeout);
}
return rval;
}
}
-----Original Message-----
From: Mark Claassen [ <ma...@ocie.net> mailto:mclaassen@ocie.net]
Sent: Tuesday, January 23, 2007 1:45 PM
To: 'HttpClient User Discussion'
Subject: RE: HttpClient, SOCKS proxy, and webstart
Well, I have some good news for you.
Just running the JRE (like through an IDE) the ProxySelector.getDefault()
gives a ProxySelector class or sun.net.spi.DefaultProxySelector Running
through webstart gives class a ProxySelector class of
com.sun.deploy.net.proxy.DeployProxySelector
So, when running in webstart, you can use the
ProxySelector.getDefault().select(URI) to get a list of proxies. For here,
it is easy to set the proxy in the
org.apache.commons.httpclient.HostConfiguration. For all the tests I have
performed, this works as expected.
So, now to restate what I was trying to say before:
As long as I set the proxy information in
org.apache.commons.httpclient.HostConfiguration, I don't need to create a
Socket with Socket(Proxy), I just need to create a socket using the values
in the createSocket method and and HttpClient will worry about the Proxy
stuff.
Thanks again,
Mark
-----Original Message-----
From: Roland Weber [ <ma...@de.ibm.com>
mailto:ROLWEBER@de.ibm.com]
Sent: Tuesday, January 23, 2007 12:28 PM
To: HttpClient User Discussion
Subject: RE: HttpClient, SOCKS proxy, and webstart
Hi Mark,
> The class sun.net.NetworkClient just basically creates a new socket
> via
> Socket() or Socket(Proxy p). Inefficiencies aside, could I just
> create
a
> SocketFactory that just creates a new socket every time?
Yes you could. Efficiency is not a problem, you'll have to create a new
Socket object anyway.
> Since it seems
> that HttpClient manages the proxies and all that, it seems I would not
need
> to bother with that.
You do need to bother. HttpClient expects to be *told* which proxy to use.
That's for HTTP proxies. If "and all that" refers to SOCKS proxies,
HttpClient does not do anything with them. This has to be handled in the
socket factories. IIRC, standard sockets will pick up SOCKS settings that
are passed to the JVM as system properties. But I don't know what else
happens in web start.
The feature of web start to determine browser settings for SOCKS and HTTP
proxies is supposed to make your life easier. Unfortunately that happens
only if you use HttpURLConnection. I have no idea how you could get to the
browser settings for HTTP proxy in web start. If you find something out,
please let us know.
hope that helps,
Roland
---------------------------------------------------------------------
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: HttpClient, SOCKS proxy, and webstart
Posted by Mark Claassen <mc...@ocie.net>.
I feel as if I am on a bit of a roll, so I went ahead and tried my own
socket factory. Is this all I need to do? Is the connection timeout all I
need to worry about here? Granted, I may be making my app not work with a
SOCKS proxy, but does anyone use SOCKS anymore?
public class MySocketFactory implements ProtocolSocketFactory {
public MySocketFactory() {
}
public Socket createSocket(String host, int port) throws
IOException, UnknownHostException {
return new Socket(host,port);
}
public Socket createSocket(String host, int port, InetAddress
localAddress, int localPort) throws IOException, UnknownHostException {
return new Socket(host,port,localAddress,localPort);
}
public Socket createSocket(String host, int port, InetAddress
localAddress, int localPort, HttpConnectionParams params) throws
IOException, UnknownHostException, ConnectTimeoutException {
Socket rval;
if (params == null) {
throw new IllegalArgumentException("Parameters may
not be null");
}
int timeout = params.getConnectionTimeout();
if (timeout == 0) {
rval = new Socket(host, port, localAddress,
localPort);
}
else {
rval = new Socket();
SocketAddress localaddr = new
InetSocketAddress(localAddress, localPort);
SocketAddress remoteaddr = new
InetSocketAddress(host, port);
rval.bind(localaddr);
rval.connect(remoteaddr, timeout);
}
return rval;
}
}
-----Original Message-----
From: Mark Claassen [ <ma...@ocie.net> mailto:mclaassen@ocie.net]
Sent: Tuesday, January 23, 2007 1:45 PM
To: 'HttpClient User Discussion'
Subject: RE: HttpClient, SOCKS proxy, and webstart
Well, I have some good news for you.
Just running the JRE (like through an IDE) the ProxySelector.getDefault()
gives a ProxySelector class or sun.net.spi.DefaultProxySelector Running
through webstart gives class a ProxySelector class of
com.sun.deploy.net.proxy.DeployProxySelector
So, when running in webstart, you can use the
ProxySelector.getDefault().select(URI) to get a list of proxies. For here,
it is easy to set the proxy in the
org.apache.commons.httpclient.HostConfiguration. For all the tests I have
performed, this works as expected.
So, now to restate what I was trying to say before:
As long as I set the proxy information in
org.apache.commons.httpclient.HostConfiguration, I don't need to create a
Socket with Socket(Proxy), I just need to create a socket using the values
in the createSocket method and and HttpClient will worry about the Proxy
stuff.
Thanks again,
Mark
-----Original Message-----
From: Roland Weber [ <ma...@de.ibm.com>
mailto:ROLWEBER@de.ibm.com]
Sent: Tuesday, January 23, 2007 12:28 PM
To: HttpClient User Discussion
Subject: RE: HttpClient, SOCKS proxy, and webstart
Hi Mark,
> The class sun.net.NetworkClient just basically creates a new socket
> via
> Socket() or Socket(Proxy p). Inefficiencies aside, could I just
> create
a
> SocketFactory that just creates a new socket every time?
Yes you could. Efficiency is not a problem, you'll have to create a new
Socket object anyway.
> Since it seems
> that HttpClient manages the proxies and all that, it seems I would not
need
> to bother with that.
You do need to bother. HttpClient expects to be *told* which proxy to use.
That's for HTTP proxies. If "and all that" refers to SOCKS proxies,
HttpClient does not do anything with them. This has to be handled in the
socket factories. IIRC, standard sockets will pick up SOCKS settings that
are passed to the JVM as system properties. But I don't know what else
happens in web start.
The feature of web start to determine browser settings for SOCKS and HTTP
proxies is supposed to make your life easier. Unfortunately that happens
only if you use HttpURLConnection. I have no idea how you could get to the
browser settings for HTTP proxy in web start. If you find something out,
please let us know.
hope that helps,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: HttpClient, SOCKS proxy, and webstart
Posted by Mark Claassen <mc...@ocie.net>.
Well, I have some good news for you.
Just running the JRE (like through an IDE) the ProxySelector.getDefault()
gives a ProxySelector class or sun.net.spi.DefaultProxySelector
Running through webstart gives class a ProxySelector class of
com.sun.deploy.net.proxy.DeployProxySelector
So, when running in webstart, you can use the
ProxySelector.getDefault().select(URI) to get a list of proxies. For here,
it is easy to set the proxy in the
org.apache.commons.httpclient.HostConfiguration. For all the tests I have
performed, this works as expected.
So, now to restate what I was trying to say before:
As long as I set the proxy information in
org.apache.commons.httpclient.HostConfiguration, I don't need to create a
Socket with Socket(Proxy), I just need to create a socket using the values
in the createSocket method and and HttpClient will worry about the Proxy
stuff.
Thanks again,
Mark
-----Original Message-----
From: Roland Weber [mailto:ROLWEBER@de.ibm.com]
Sent: Tuesday, January 23, 2007 12:28 PM
To: HttpClient User Discussion
Subject: RE: HttpClient, SOCKS proxy, and webstart
Hi Mark,
> The class sun.net.NetworkClient just basically creates a new socket
> via
> Socket() or Socket(Proxy p). Inefficiencies aside, could I just
> create
a
> SocketFactory that just creates a new socket every time?
Yes you could. Efficiency is not a problem, you'll have to create a new
Socket object anyway.
> Since it seems
> that HttpClient manages the proxies and all that, it seems I would not
need
> to bother with that.
You do need to bother. HttpClient expects to be *told* which proxy to use.
That's for HTTP proxies. If "and all that" refers to SOCKS proxies,
HttpClient does not do anything with them. This has to be handled in the
socket factories. IIRC, standard sockets will pick up SOCKS settings that
are passed to the JVM as system properties. But I don't know what else
happens in web start.
The feature of web start to determine browser settings for SOCKS and HTTP
proxies is supposed to make your life easier. Unfortunately that happens
only if you use HttpURLConnection. I have no idea how you could get to the
browser settings for HTTP proxy in web start. If you find something out,
please let us know.
hope that helps,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
RE: HttpClient, SOCKS proxy, and webstart
Posted by Roland Weber <RO...@de.ibm.com>.
Hi Mark,
> The class sun.net.NetworkClient just basically creates a new socket via
> Socket() or Socket(Proxy p). Inefficiencies aside, could I just create
a
> SocketFactory that just creates a new socket every time?
Yes you could. Efficiency is not a problem, you'll have to create a
new Socket object anyway.
> Since it seems
> that HttpClient manages the proxies and all that, it seems I would not
need
> to bother with that.
You do need to bother. HttpClient expects to be *told* which proxy to
use. That's for HTTP proxies. If "and all that" refers to SOCKS proxies,
HttpClient does not do anything with them. This has to be handled in the
socket factories. IIRC, standard sockets will pick up SOCKS settings
that are passed to the JVM as system properties. But I don't know what
else happens in web start.
The feature of web start to determine browser settings for SOCKS and
HTTP proxies is supposed to make your life easier. Unfortunately that
happens only if you use HttpURLConnection. I have no idea how you could
get to the browser settings for HTTP proxy in web start. If you find
something out, please let us know.
hope that helps,
Roland
RE: HttpClient, SOCKS proxy, and webstart
Posted by Mark Claassen <mc...@ocie.net>.
Thanks for the advice. Right now I am going to wait a bit and see what Sun
will say in the bug report I submitted.
The class sun.net.NetworkClient just basically creates a new socket via
Socket() or Socket(Proxy p). Inefficiencies aside, could I just create a
SocketFactory that just creates a new socket every time? Since it seems
that HttpClient manages the proxies and all that, it seems I would not need
to bother with that. All I would need to do is to create a new Socket with
the constructor arguments that match the createSocket(...) methods. (And
set options based on the HttpConnectionParams.)
Like I said, hopefully Sun will address the issue with some ideas of their
own. But, barring that, is the SocketFactory I mentioned above technically
viable?
Thanks,
Mark
-----Original Message-----
From: Roland Weber [mailto:http-async@dubioso.net]
Sent: Saturday, January 20, 2007 10:58 AM
To: HttpClient User Discussion
Subject: Re: HttpClient, SOCKS proxy, and webstart
Hi Mark,
> I have been having some trouble with HttpClient and the SOCKS proxy.
> My path to where I am now is a long and sorted tale, so here is my
summary:
>
> Webstart gets its proxy settings from the Windows default browser
Your problem is a new twist to the "proxy configuration" discussion in the
application design FAQ:
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQu
estions
Unlike HTTP proxy settings, SOCKS is not directly in scope for HttpClient:
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners#head-e5df7842
07b3082d88f0c254a0b656275c2b2855
> I am not sure if this is a bug in Firefox, in the default
> SocketFactory, or in HttpClient.
It's a bug in Webstart, or in the Firefox/Webstart interaction. I don't know
whether Webstart can determine whether Firefox's checkbox is set
> What I want to know is how to work around this.
>
> HttpURLConnection seems to create its sockets from
> sun.net.NetworkClient and not a SocketFactory, which apparently makes
> it immune to this problem
I don't see how we could work around this in HttpClient. However, socket
creation in HttpClient is explicitly encapsulated in SocketFactories:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/http
client/protocol/ProtocolSocketFactory.html
Maybe you can implement your own socket factory which calls
sun.net.NetworkClient? If it is possible, and if you can live with calling
SUN internal classes, that should make your app immune to this problem as
well.
hope that helps,
Roland
---------------------------------------------------------------------
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: HttpClient, SOCKS proxy, and webstart
Posted by Roland Weber <ht...@dubioso.net>.
Hi Mark,
> I have been having some trouble with HttpClient and the SOCKS proxy. My
> path to where I am now is a long and sorted tale, so here is my summary:
>
> Webstart gets its proxy settings from the Windows default browser
Your problem is a new twist to the "proxy configuration" discussion in
the application design FAQ:
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQuestions
Unlike HTTP proxy settings, SOCKS is not directly in scope for HttpClient:
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners#head-e5df784207b3082d88f0c254a0b656275c2b2855
> I am not sure if this is a bug in Firefox, in the default SocketFactory, or
> in HttpClient.
It's a bug in Webstart, or in the Firefox/Webstart interaction. I don't know
whether Webstart can determine whether Firefox's checkbox is set
> What I want to know is how to work around this.
>
> HttpURLConnection seems to create its sockets from sun.net.NetworkClient and
> not a SocketFactory, which apparently makes it immune to this problem
I don't see how we could work around this in HttpClient. However, socket
creation in HttpClient is explicitly encapsulated in SocketFactories:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html
Maybe you can implement your own socket factory which calls
sun.net.NetworkClient? If it is possible, and if you can live
with calling SUN internal classes, that should make your app
immune to this problem as well.
hope that helps,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org