You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2023/05/11 20:06:12 UTC
[GitHub] [netbeans] matthiasblaesing commented on pull request #5935: fail proxy pac on windows if no URL
matthiasblaesing commented on PR #5935:
URL: https://github.com/apache/netbeans/pull/5935#issuecomment-1544605712
To my understanding the download URL `http://wpad/wpad.dat` is correct. The system will resolve the host `wpad` in the local DNS prefix. And try to download the wpad file from there. This can be read into
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:
https://github.com/apache/netbeans/blob/75bb740f9d75f237159677f4f0410271b40ece52/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java#L47-L49
Only if that is present:
https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpgetieproxyconfigforcurrentuser
https://github.com/apache/netbeans/blob/75bb740f9d75f237159677f4f0410271b40ece52/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java#L51
And only if there is no PAC url configured, but autodetection is enabled:
https://learn.microsoft.com/en-us/windows/win32/api/winhttp/ns-winhttp-winhttp_current_user_ie_proxy_config
https://github.com/apache/netbeans/blob/75bb740f9d75f237159677f4f0410271b40ece52/platform/core.network/src/org/netbeans/core/network/proxy/windows/WindowsNetworkProxy.java#L59-L60
that URL is returned.
Sounds reasonable to me.
It was added recently: https://github.com/apache/netbeans/pull/5210 and maybe the `java.net.UnknownHostException` should be caught and a sensible message issued. This PR would just reintroduce the issue, that was fixed by #5210.
@sdedic could you have a look at this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists