diff --git a/Release/src/http/client/http_client_winhttp.cpp b/Release/src/http/client/http_client_winhttp.cpp index eb94f0f984..61a13abfb5 100644 --- a/Release/src/http/client/http_client_winhttp.cpp +++ b/Release/src/http/client/http_client_winhttp.cpp @@ -803,7 +803,12 @@ class winhttp_client final : public _http_client_communicator access_type = WINHTTP_ACCESS_TYPE_DEFAULT_PROXY; proxy_name = WINHTTP_NO_PROXY_NAME; -#ifndef CPPREST_TARGET_XP +#ifdef CPPREST_TARGET_XP + if (config.proxy().is_auto_discovery()) + { + m_proxy_auto_config = true; + } +#else // ^^^ CPPREST_TARGET_XP ^^^ // vvv !CPPREST_TARGET_XP vvv if (IsWindows8Point1OrGreater()) { // Windows 8.1 and newer supports automatic proxy discovery and auto-fallback to IE proxy settings @@ -843,13 +848,13 @@ class winhttp_client final : public _http_client_communicator } } } - } -#endif - if (config.proxy().is_auto_discovery()) - { - m_proxy_auto_config = true; + if (config.proxy().is_auto_discovery()) + { + m_proxy_auto_config = true; + } } +#endif // CPPREST_TARGET_XP } else {