Skip to content

Commit

Permalink
Fixes keep-alive state again..
Browse files Browse the repository at this point in the history
  • Loading branch information
jsc-paneda committed Sep 6, 2024
1 parent e551a3c commit e230bbb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/request_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ RequestParser::result_type RequestParser::consume(Request &req,
req.keepAlive_ = false;
}
} else {
if (req.httpVersionMajor_ < 1 ||
(req.httpVersionMajor_ == 1 && req.httpVersionMinor_ == 0)) {
req.keepAlive_ = false;
req.keepAlive_ = false;
if (req.httpVersionMajor_ > 1 ||
(req.httpVersionMajor_ == 1 && req.httpVersionMinor_ == 1)) {
req.keepAlive_ = true;
}
}

Expand Down

0 comments on commit e230bbb

Please sign in to comment.