фикс: зависания соединения с протоколом http
This commit is contained in:
@@ -50,9 +50,7 @@ namespace http::server {
|
||||
|
||||
void Connection::doWrite() {
|
||||
reply_.headers.push_back({.name = "Server", .value = SERVER_HEADER_VALUE});
|
||||
if (!reply_.content.empty()) {
|
||||
reply_.headers.push_back({.name = "Content-Length", .value = std::to_string(reply_.content.size())});
|
||||
}
|
||||
if (request_.http_version_major == 1) {
|
||||
reply_.headers.push_back({.name = "Connection", .value = "keep-alive"});
|
||||
}
|
||||
|
Reference in New Issue
Block a user