Skip to content

Commit

Permalink
Disable WINHTTP_AUTOPROXY_OPTIONS machinery when using WINHTTP_ACCESS…
Browse files Browse the repository at this point in the history
…_TYPE_AUTOMATIC_PROXY. (#1040)
  • Loading branch information
BillyONeal authored Feb 11, 2019
1 parent 91f66c6 commit a2b9a05
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Release/src/http/client/http_client_winhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit a2b9a05

Please sign in to comment.