Skip to content

Commit a1764e0

Browse files
Jokserexcitoon
authored andcommitted
Possibility to set HTTPS proxy scheme per request. aws#2
1 parent 2940004 commit a1764e0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ namespace Aws
5656
{
5757
ClientConfigurationPerRequest() : proxyPort(0) {}
5858

59+
/**
60+
* If you have users going through a proxy, set the proxy scheme here. Default HTTP
61+
*/
62+
Aws::Http::Scheme proxyScheme;
5963
/**
6064
* If you have users going through a proxy, set the host here.
6165
*/

aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,8 @@ std::shared_ptr<HttpResponse> CurlHttpClient::MakeRequest(const std::shared_ptr<
680680
if (usingProxy)
681681
{
682682
Aws::StringStream ss;
683-
ss << m_proxyScheme << "://" << try_redefine(m_proxyHost, requestConfiguration.proxyHost);
683+
ss << try_redefine(m_proxyScheme, Aws::String(SchemeMapper::ToString(requestConfiguration.proxyScheme)))
684+
<< "://" << try_redefine(m_proxyHost, requestConfiguration.proxyHost);
684685
curl_easy_setopt(connectionHandle, CURLOPT_PROXY, ss.str().c_str());
685686
curl_easy_setopt(connectionHandle, CURLOPT_PROXYPORT, (long) try_redefine(m_proxyPort, requestConfiguration.proxyPort, 0U));
686687
if (!m_proxyUserName.empty() || !m_proxyPassword.empty())

0 commit comments

Comments
 (0)