Update HTTPServerResponse.cpp

This commit is contained in:
Alexey Milovidov 2024-02-26 03:34:35 +03:00 committed by GitHub
parent 2edb3d5ba1
commit 34e85959c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,15 +125,15 @@ void HTTPServerResponse::requireAuthentication(const std::string & realm)
void HTTPServerResponse::redirect(const std::string & uri, HTTPStatus status)
{
poco_assert(!stream);
poco_assert(!stream);
setContentLength(0);
setChunkedTransferEncoding(false);
setContentLength(0);
setChunkedTransferEncoding(false);
setStatusAndReason(status);
set("Location", uri);
setStatusAndReason(status);
set("Location", uri);
// Send header
// Send header
Poco::Net::HTTPHeaderOutputStream hs(session);
write(hs);
hs.flush();