From 9fc0e1a0d2552ef2b1d10ea71caa987412d1c7f3 Mon Sep 17 00:00:00 2001 From: Jamiras Date: Mon, 30 Dec 2019 17:38:07 -0700 Subject: [PATCH] set WINHTTP_FLAG_SECURE when using HTTPS port --- src/services/impl/WindowsHttpRequester.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/impl/WindowsHttpRequester.cpp b/src/services/impl/WindowsHttpRequester.cpp index 35feefdf4..ecb0d8fc4 100644 --- a/src/services/impl/WindowsHttpRequester.cpp +++ b/src/services/impl/WindowsHttpRequester.cpp @@ -154,7 +154,7 @@ unsigned int WindowsHttpRequester::Request(const Http::Request& pRequest, TextWr nullptr, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, - 0); + (nPort == INTERNET_DEFAULT_HTTPS_PORT) ? WINHTTP_FLAG_SECURE : 0); if (hRequest == nullptr) {