diff --git a/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h b/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h index 23b5368a41ee..e16838d62802 100644 --- a/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h +++ b/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h @@ -49,8 +49,12 @@ namespace Aws */ struct AWS_CORE_API ClientConfigurationPerRequest { - ClientConfigurationPerRequest() : proxyPort(0) {} + ClientConfigurationPerRequest() : proxyScheme(Aws::Http::Scheme::HTTPS), proxyPort(0) {} + /** + * If you have users going through a proxy, set the proxy scheme here. Default HTTP + */ + Aws::Http::Scheme proxyScheme; /** * If you have users going through a proxy, set the host here. */ diff --git a/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp b/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp index 7eec0fb05e1c..53075526cc9d 100644 --- a/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp +++ b/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp @@ -575,7 +575,8 @@ void CurlHttpClient::MakeRequestInternal(HttpRequest& request, if (usingProxy) { Aws::StringStream ss; - ss << m_proxyScheme << "://" << try_redefine(m_proxyHost, requestConfiguration.proxyHost); + ss << try_redefine(m_proxyScheme, Aws::String(SchemeMapper::ToString(requestConfiguration.proxyScheme))) + << "://" << try_redefine(m_proxyHost, requestConfiguration.proxyHost); curl_easy_setopt(connectionHandle, CURLOPT_PROXY, ss.str().c_str()); curl_easy_setopt(connectionHandle, CURLOPT_PROXYPORT, (long) try_redefine(m_proxyPort, requestConfiguration.proxyPort, 0U)); if (!m_proxyUserName.empty() || !m_proxyPassword.empty())