Skip to content

Commit

Permalink
#147: Try to fix proxy not found if autoDetect is enabled but detectA…
Browse files Browse the repository at this point in the history
…utoProxyConfigUrl returns empty string.
  • Loading branch information
akuhtz committed Nov 12, 2024
1 parent d2e11e4 commit b036e0c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ private PacProxySelector createPacSelector(IEProxyConfig ieProxyConfig) {
WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A);
pacUrl = WinHttpHelpers.detectAutoProxyConfigUrl(dwAutoDetectFlags);
}
if (pacUrl == null) {
if (pacUrl == null || pacUrl.trim().length() == 0) {
pacUrl = ieProxyConfig.getAutoConfigUrl();
Logger.log(getClass(), LogLevel.TRACE, "Autodetecting script URL did not return valid pacUrl. Use autoConfigUrl from IE proxy config: " + pacUrl);
}
if (pacUrl != null && pacUrl.trim().length() > 0) {
Logger.log(getClass(), LogLevel.TRACE, "IE uses script: " + pacUrl);
Expand All @@ -121,6 +122,9 @@ private PacProxySelector createPacSelector(IEProxyConfig ieProxyConfig) {
}
return ProxyUtil.buildPacSelectorForUrl(pacUrl);
}
else {
Logger.log(getClass(), LogLevel.TRACE, "The pacUrl for IE is not available: " + pacUrl);
}

return null;
}
Expand Down

0 comments on commit b036e0c

Please sign in to comment.