Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY conflict #1040

Merged
merged 1 commit into from
Feb 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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