aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard
diff options
context:
space:
mode:
authornalpp <nalpp@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit30d1ef3941e0dc835be7609de5ebee66958f215a (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard
parent87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (diff)
downloadydb-30d1ef3941e0dc835be7609de5ebee66958f215a.tar.gz
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard')
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpRequest.cpp192
-rw-r--r--contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpResponse.cpp84
2 files changed, 138 insertions, 138 deletions
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpRequest.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpRequest.cpp
index 1125eb57ce..47a0ee4fac 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpRequest.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpRequest.cpp
@@ -2,103 +2,103 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
-
-#include <aws/core/http/standard/StandardHttpRequest.h>
-
-#include <aws/core/utils/StringUtils.h>
-
-#include <iostream>
-#include <algorithm>
-#include <cassert>
-
-using namespace Aws::Http;
-using namespace Aws::Http::Standard;
-using namespace Aws::Utils;
-
-static bool IsDefaultPort(const URI& uri)
-{
- switch(uri.GetPort())
- {
- case 80:
- return uri.GetScheme() == Scheme::HTTP;
- case 443:
- return uri.GetScheme() == Scheme::HTTPS;
- default:
- return false;
- }
-}
-
-StandardHttpRequest::StandardHttpRequest(const URI& uri, HttpMethod method) :
- HttpRequest(uri, method),
- bodyStream(nullptr),
- m_responseStreamFactory()
-{
- if(IsDefaultPort(uri))
- {
+
+#include <aws/core/http/standard/StandardHttpRequest.h>
+
+#include <aws/core/utils/StringUtils.h>
+
+#include <iostream>
+#include <algorithm>
+#include <cassert>
+
+using namespace Aws::Http;
+using namespace Aws::Http::Standard;
+using namespace Aws::Utils;
+
+static bool IsDefaultPort(const URI& uri)
+{
+ switch(uri.GetPort())
+ {
+ case 80:
+ return uri.GetScheme() == Scheme::HTTP;
+ case 443:
+ return uri.GetScheme() == Scheme::HTTPS;
+ default:
+ return false;
+ }
+}
+
+StandardHttpRequest::StandardHttpRequest(const URI& uri, HttpMethod method) :
+ HttpRequest(uri, method),
+ bodyStream(nullptr),
+ m_responseStreamFactory()
+{
+ if(IsDefaultPort(uri))
+ {
StandardHttpRequest::SetHeaderValue(HOST_HEADER, uri.GetAuthority());
- }
- else
- {
- Aws::StringStream host;
- host << uri.GetAuthority() << ":" << uri.GetPort();
+ }
+ else
+ {
+ Aws::StringStream host;
+ host << uri.GetAuthority() << ":" << uri.GetPort();
StandardHttpRequest::SetHeaderValue(HOST_HEADER, host.str());
- }
-}
-
-HeaderValueCollection StandardHttpRequest::GetHeaders() const
-{
- HeaderValueCollection headers;
-
- for (HeaderValueCollection::const_iterator iter = headerMap.begin(); iter != headerMap.end(); ++iter)
- {
- headers.emplace(HeaderValuePair(iter->first, iter->second));
- }
-
- return headers;
-}
-
-const Aws::String& StandardHttpRequest::GetHeaderValue(const char* headerName) const
-{
- auto iter = headerMap.find(headerName);
- assert (iter != headerMap.end());
- return iter->second;
-}
-
-void StandardHttpRequest::SetHeaderValue(const char* headerName, const Aws::String& headerValue)
-{
- headerMap[StringUtils::ToLower(headerName)] = StringUtils::Trim(headerValue.c_str());
-}
-
-void StandardHttpRequest::SetHeaderValue(const Aws::String& headerName, const Aws::String& headerValue)
-{
- headerMap[StringUtils::ToLower(headerName.c_str())] = StringUtils::Trim(headerValue.c_str());
-}
-
-void StandardHttpRequest::DeleteHeader(const char* headerName)
-{
- headerMap.erase(StringUtils::ToLower(headerName));
-}
-
-bool StandardHttpRequest::HasHeader(const char* headerName) const
+ }
+}
+
+HeaderValueCollection StandardHttpRequest::GetHeaders() const
+{
+ HeaderValueCollection headers;
+
+ for (HeaderValueCollection::const_iterator iter = headerMap.begin(); iter != headerMap.end(); ++iter)
+ {
+ headers.emplace(HeaderValuePair(iter->first, iter->second));
+ }
+
+ return headers;
+}
+
+const Aws::String& StandardHttpRequest::GetHeaderValue(const char* headerName) const
+{
+ auto iter = headerMap.find(headerName);
+ assert (iter != headerMap.end());
+ return iter->second;
+}
+
+void StandardHttpRequest::SetHeaderValue(const char* headerName, const Aws::String& headerValue)
+{
+ headerMap[StringUtils::ToLower(headerName)] = StringUtils::Trim(headerValue.c_str());
+}
+
+void StandardHttpRequest::SetHeaderValue(const Aws::String& headerName, const Aws::String& headerValue)
+{
+ headerMap[StringUtils::ToLower(headerName.c_str())] = StringUtils::Trim(headerValue.c_str());
+}
+
+void StandardHttpRequest::DeleteHeader(const char* headerName)
+{
+ headerMap.erase(StringUtils::ToLower(headerName));
+}
+
+bool StandardHttpRequest::HasHeader(const char* headerName) const
+{
+ return headerMap.find(StringUtils::ToLower(headerName)) != headerMap.end();
+}
+
+int64_t StandardHttpRequest::GetSize() const
+{
+ int64_t size = 0;
+
+ std::for_each(headerMap.cbegin(), headerMap.cend(), [&](const HeaderValueCollection::value_type& kvPair){ size += kvPair.first.length(); size += kvPair.second.length(); });
+
+ return size;
+}
+
+const Aws::IOStreamFactory& StandardHttpRequest::GetResponseStreamFactory() const
{
- return headerMap.find(StringUtils::ToLower(headerName)) != headerMap.end();
-}
-
-int64_t StandardHttpRequest::GetSize() const
+ return m_responseStreamFactory;
+}
+
+void StandardHttpRequest::SetResponseStreamFactory(const Aws::IOStreamFactory& factory)
{
- int64_t size = 0;
-
- std::for_each(headerMap.cbegin(), headerMap.cend(), [&](const HeaderValueCollection::value_type& kvPair){ size += kvPair.first.length(); size += kvPair.second.length(); });
-
- return size;
-}
-
-const Aws::IOStreamFactory& StandardHttpRequest::GetResponseStreamFactory() const
-{
- return m_responseStreamFactory;
-}
-
-void StandardHttpRequest::SetResponseStreamFactory(const Aws::IOStreamFactory& factory)
-{
- m_responseStreamFactory = factory;
-}
+ m_responseStreamFactory = factory;
+}
diff --git a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpResponse.cpp b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpResponse.cpp
index 2097a5efa4..92d7a062b6 100644
--- a/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpResponse.cpp
+++ b/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/http/standard/StandardHttpResponse.cpp
@@ -2,45 +2,45 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
-
-#include <aws/core/http/standard/StandardHttpResponse.h>
-
-#include <aws/core/utils/StringUtils.h>
-#include <aws/core/utils/memory/AWSMemory.h>
-
-#include <istream>
-
-using namespace Aws::Http;
-using namespace Aws::Http::Standard;
-using namespace Aws::Utils;
-
-
-HeaderValueCollection StandardHttpResponse::GetHeaders() const
-{
- HeaderValueCollection headerValueCollection;
-
- for (Aws::Map<Aws::String, Aws::String>::const_iterator iter = headerMap.begin(); iter != headerMap.end(); ++iter)
- {
- headerValueCollection.emplace(HeaderValuePair(iter->first, iter->second));
- }
-
- return headerValueCollection;
-}
-
-bool StandardHttpResponse::HasHeader(const char* headerName) const
-{
- return headerMap.find(StringUtils::ToLower(headerName)) != headerMap.end();
-}
-
-const Aws::String& StandardHttpResponse::GetHeader(const Aws::String& headerName) const
-{
- Aws::Map<Aws::String, Aws::String>::const_iterator foundValue = headerMap.find(StringUtils::ToLower(headerName.c_str()));
- return foundValue->second;
-}
-
-void StandardHttpResponse::AddHeader(const Aws::String& headerName, const Aws::String& headerValue)
-{
- headerMap[StringUtils::ToLower(headerName.c_str())] = headerValue;
-}
-
-
+
+#include <aws/core/http/standard/StandardHttpResponse.h>
+
+#include <aws/core/utils/StringUtils.h>
+#include <aws/core/utils/memory/AWSMemory.h>
+
+#include <istream>
+
+using namespace Aws::Http;
+using namespace Aws::Http::Standard;
+using namespace Aws::Utils;
+
+
+HeaderValueCollection StandardHttpResponse::GetHeaders() const
+{
+ HeaderValueCollection headerValueCollection;
+
+ for (Aws::Map<Aws::String, Aws::String>::const_iterator iter = headerMap.begin(); iter != headerMap.end(); ++iter)
+ {
+ headerValueCollection.emplace(HeaderValuePair(iter->first, iter->second));
+ }
+
+ return headerValueCollection;
+}
+
+bool StandardHttpResponse::HasHeader(const char* headerName) const
+{
+ return headerMap.find(StringUtils::ToLower(headerName)) != headerMap.end();
+}
+
+const Aws::String& StandardHttpResponse::GetHeader(const Aws::String& headerName) const
+{
+ Aws::Map<Aws::String, Aws::String>::const_iterator foundValue = headerMap.find(StringUtils::ToLower(headerName.c_str()));
+ return foundValue->second;
+}
+
+void StandardHttpResponse::AddHeader(const Aws::String& headerName, const Aws::String& headerValue)
+{
+ headerMap[StringUtils::ToLower(headerName.c_str())] = headerValue;
+}
+
+