Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2173399 | 6u14 | Jean-Christophe Collet | P2 | Resolved | Fixed | b03 |
FULL PRODUCT VERSION :
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux ukp79266 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The DefaultProxySelector implementation will never use a proxy for a request to "localhost" even if the invoker has specifically speficied that no host will be excluded.
This is a problem when trying to connect to a sever on the current machine whilst trying to use some kind of http packet monitoring tool. (In this case the HTTP Analyzer from JDeveloper)
So in this case the url to the web service I am trying to connect with is "http://localhost:7101/..." and the name of the proxy is "localhost:8898". The parameter passed into the running client are:
-Dhttp.proxyHost = localhost
-Dhttp.proxyPort = 8988
-Dhttp.nonProxyHosts =
I would have hoped that the default proxy selector would honor the fact I have requested an empty ingore list. Looking at the code it appears that the test for local host is performed well before the property is even queried.
The localhost test should only be applied if and when the nonProxyHosts property for the given protocol is null.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Configure a http proxying tools such as tcp mon on the local machine
2. Run web service on machine
3. Run java client for web service with http proxy properties set to use the http proxying tool and set up to connect to a local host URL.
No traffic will be sent the way of the monitor tool. It will never be proxied.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When nonProxyedHosts is defiend as being blank even localhost should be proxied.
ACTUAL -
All request to localhost go un proxied.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Put in place own ProxySelector; but this doesn't allow a developer to test software without making modifications.
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux ukp79266 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The DefaultProxySelector implementation will never use a proxy for a request to "localhost" even if the invoker has specifically speficied that no host will be excluded.
This is a problem when trying to connect to a sever on the current machine whilst trying to use some kind of http packet monitoring tool. (In this case the HTTP Analyzer from JDeveloper)
So in this case the url to the web service I am trying to connect with is "http://localhost:7101/..." and the name of the proxy is "localhost:8898". The parameter passed into the running client are:
-Dhttp.proxyHost = localhost
-Dhttp.proxyPort = 8988
-Dhttp.nonProxyHosts =
I would have hoped that the default proxy selector would honor the fact I have requested an empty ingore list. Looking at the code it appears that the test for local host is performed well before the property is even queried.
The localhost test should only be applied if and when the nonProxyHosts property for the given protocol is null.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Configure a http proxying tools such as tcp mon on the local machine
2. Run web service on machine
3. Run java client for web service with http proxy properties set to use the http proxying tool and set up to connect to a local host URL.
No traffic will be sent the way of the monitor tool. It will never be proxied.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When nonProxyedHosts is defiend as being blank even localhost should be proxied.
ACTUAL -
All request to localhost go un proxied.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Put in place own ProxySelector; but this doesn't allow a developer to test software without making modifications.
- backported by
-
JDK-2173399 sun.misc.net.DefaultProxySelector doesn't use proxy setting to localhost
- Resolved
- relates to
-
JDK-7141335 Disable localhost proxying for Socks [macosx]
- In Progress
-
JDK-4924226 PIT: Can not launch jnlp application via 127.0.0.1 address on the web server
- Resolved
-
JDK-8025065 "Bypass proxy server for local addresses" not taken into account
- Closed