Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0
-
None
-
Windows
-
fd60a3796ec4d4976965c81b7e14a538343050c4 (4.8), 4cc8209998c386a4372f10496f0c97f3d86f92bb (5.0)
Description
In qnetworkproxy_win.cpp, on lines 328-335, it reads:
if (ieProxyConfig.fAutoDetect) { autoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT; autoProxyOptions.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A; } else { autoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL; autoProxyOptions.lpszAutoConfigUrl = (LPCWSTR)autoConfigUrl.utf16(); }
I believe this is incorrect logic. If the system is configured with both Auto Detect AND an auto config url (i.e. PAC file), then the auto config url should take precedence over the auto detect. The current logic only works if Auto Detect is disabled and there is an auto config url specified. When Auto Detect is enabled and an auto config url is specified, the latter should be used most definitely. Most users don't uncheck the Auto Detect setting...
Here is what the code should be changed to:
if (ieProxyConfig.fAutoDetect && autoConfigUrl.isEmpty()) { autoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT; autoProxyOptions.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A; } else { autoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL; autoProxyOptions.lpszAutoConfigUrl = (LPCWSTR)autoConfigUrl.utf16(); }
We're in a block of code that ensures that at least one or the other is specified. In the case that both are specified, auto detect should only be used when autoConfigUrl is empty.
Thanks,
Jarred
Attachments
Issue Links
- depends on
-
QTBUG-2069 Proxy Auto Config support in QtNetwork module
- Closed
- relates to
-
QTBUG-10428 QNAM discards manual proxy server on Windows when 'Automatically detect settings' is checked (Win7 default)
- Closed