This commit is contained in:
Yakov Olkhovskiy 2023-10-28 20:53:39 +00:00
parent 5ef24494f4
commit 6ed150b9d3
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ std::shared_ptr<WriteBufferFromPocoSocket> HTTPServerResponse::send()
// Send header
Poco::Net::HTTPHeaderOutputStream hs(session);
write(hs);
// Don't create stream - it's a header-only response
stream = std::make_shared<WriteBufferFromPocoSocket>(session.socket(), write_metric);
}
else if (getChunkedTransferEncoding())
{

View File

@ -913,7 +913,7 @@ try
{
/// In case data has already been sent, like progress headers, try using the output buffer to
/// set the exception code since it will be able to append it if it hasn't finished writing headers
if (response.sent() && used_output.out)
if (response.sent() && used_output.out_holder)
used_output.out_holder->setExceptionCode(exception_code);
else
response.set("X-ClickHouse-Exception-Code", toString<int>(exception_code));