Fix memsan

This commit is contained in:
alesapin 2022-08-24 15:25:10 +02:00
parent f0b733313f
commit e3672d1d40
2 changed files with 1 additions and 4 deletions

View File

@ -366,7 +366,6 @@ void PocoHTTPClient::makeRequestInternal(
{
LOG_WARNING(log, "Response for request contain <Error> tag in body, settings internal server error (500 code)");
response->SetResponseCode(Aws::Http::HttpResponseCode::INTERNAL_SERVER_ERROR);
status_code = static_cast<int32_t>(Aws::Http::HttpResponseCode::INTERNAL_SERVER_ERROR);
ProfileEvents::increment(select_metric(S3MetricType::Errors));
if (error_report)

View File

@ -82,9 +82,8 @@ public:
void SetResponseBody(std::string & response_body) /// NOLINT
{
stringbuf.emplace(response_body);
body_stream = Aws::Utils::Stream::ResponseStream(
Aws::New<SessionAwareIOStream<SessionPtr>>("http result string", nullptr, &stringbuf.value())
Aws::New<std::stringstream>("http result buf", response_body)
);
}
@ -100,7 +99,6 @@ public:
private:
Aws::Utils::Stream::ResponseStream body_stream;
std::optional<std::stringbuf> stringbuf;
};
class PocoHTTPClient : public Aws::Http::HttpClient