-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fail proxy pac on windows if no URL #5935
Conversation
To my understanding the download URL https://datatracker.ietf.org/doc/html/draft-ietf-wrec-wpad-01#section-4.4.3 To get that URL on Windows, the following sequence has to run: The system is queried for proxy configuration: netbeans/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java Lines 47 to 49 in 75bb740
Only if that is present: netbeans/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java Line 51 in 75bb740
And only if there is no PAC url configured, but autodetection is enabled: netbeans/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java Lines 59 to 60 in 75bb740
that URL is returned. Sounds reasonable to me. It was added recently: #5210 and maybe the @sdedic could you have a look at this? |
@matthiasblaesing thanks for precision. I have no idea why wpad not working on my computer and others. By the way more simple PR with only a triage of exception |
@ebarboni thanks for the update. The
|
@sdedic I do the proposed Info log message |
This is a "fix" to get rid of an annoying exception thrown on every launchd as info during windows autoproxy.
I'm not sure this is right approach but "to me" as no URL are set I don't get why it should use http://wdap/wdap.dat.
So exiting early.
That the exception scaring user :p :
INFO [org.netbeans.core.network.proxy.ProxyAutoConfig]: InputStream for http://wpad/wpad.dat throws
java.net.UnknownHostException: wpad
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:567)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
at java.base/sun.net.www.http.HttpClient.(HttpClient.java:279)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:384)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:406)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1309)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1287)
at java.base/sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1118)
at java.base/sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1116)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:962)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1115)
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1057)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1665)
at java.base/sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1581)
at java.base/sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1579)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:962)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1578)
at org.netbeans.core.network.proxy.ProxyAutoConfig.downloadPAC(ProxyAutoConfig.java:155)
[catch] at org.netbeans.core.network.proxy.ProxyAutoConfig.initEngine(ProxyAutoConfig.java:94)
at org.netbeans.core.network.proxy.ProxyAutoConfig$1.run(ProxyAutoConfig.java:82)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)