mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 17:28:29 +00:00
Fixed connection end problem with HTTP/1.0 client
This commit is contained in:
parent
2d30c59340
commit
cb11d9412e
1 changed files with 5 additions and 0 deletions
|
@ -2033,6 +2033,11 @@ Server::process_request(Stream &strm, bool last_connection,
|
||||||
connection_close = true;
|
connection_close = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (req.version == "HTTP/1.0" &&
|
||||||
|
req.get_header_value("Connection") != "Keep-Alive") {
|
||||||
|
connection_close = true;
|
||||||
|
}
|
||||||
|
|
||||||
req.set_header("REMOTE_ADDR", strm.get_remote_addr().c_str());
|
req.set_header("REMOTE_ADDR", strm.get_remote_addr().c_str());
|
||||||
|
|
||||||
// Body
|
// Body
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue