File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,12 @@ class winhttp_client final : public _http_client_communicator
803803 access_type = WINHTTP_ACCESS_TYPE_DEFAULT_PROXY;
804804 proxy_name = WINHTTP_NO_PROXY_NAME;
805805
806- #ifndef CPPREST_TARGET_XP
806+ #ifdef CPPREST_TARGET_XP
807+ if (config.proxy ().is_auto_discovery ())
808+ {
809+ m_proxy_auto_config = true ;
810+ }
811+ #else // ^^^ CPPREST_TARGET_XP ^^^ // vvv !CPPREST_TARGET_XP vvv
807812 if (IsWindows8Point1OrGreater ())
808813 {
809814 // 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
843848 }
844849 }
845850 }
846- }
847- #endif
848851
849- if (config.proxy ().is_auto_discovery ())
850- {
851- m_proxy_auto_config = true ;
852+ if (config.proxy ().is_auto_discovery ())
853+ {
854+ m_proxy_auto_config = true ;
855+ }
852856 }
857+ #endif // CPPREST_TARGET_XP
853858 }
854859 else
855860 {
You can’t perform that action at this time.
0 commit comments