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-18.104.22.168.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
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 :
When nonProxyedHosts is defiend as being blank even localhost should be proxied.
All request to localhost go un proxied.
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.