Skip to content

Commit

Permalink
Fix curl headers when value is absent
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Nov 14, 2023
1 parent 26d9086 commit 690fa43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/aws-cpp-sdk-core/source/http/curl/CurlHttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,11 @@ std::shared_ptr<HttpResponse> CurlHttpClient::MakeRequest(const std::shared_ptr<
for (auto& requestHeader : requestHeaders)
{
headerStream.str("");
headerStream << requestHeader.first << ": " << requestHeader.second;
if (requestHeader.second.empty()) {
headerStream << requestHeader.first << ";";
} else {
headerStream << requestHeader.first << ": " << requestHeader.second;
}
Aws::String headerString = headerStream.str();
AWS_LOGSTREAM_TRACE(CURL_HTTP_CLIENT_TAG, headerString);
headers = curl_slist_append(headers, headerString.c_str());
Expand Down

0 comments on commit 690fa43

Please sign in to comment.