fix send HTTP header

This commit is contained in:
Yakov Olkhovskiy 2023-10-31 12:56:06 +00:00
parent 43c2c83ae2
commit ad3b46b5a7

View File

@ -106,6 +106,7 @@ void HTTPServerResponse::sendBuffer(const void * buffer, std::size_t length)
// Send header
Poco::Net::HTTPHeaderOutputStream hs(session);
write(hs);
hs.flush();
if (request && request->getMethod() != HTTPRequest::HTTP_HEAD)
WriteBufferFromPocoSocket(session.socket(), write_metric).write(static_cast<const char *>(buffer), length);