mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-11 21:53:57 +00:00
Fixed problem with requests with no content
This commit is contained in:
parent
905f2d84f4
commit
6f58dc728f
@ -2819,8 +2819,10 @@ inline bool Server::routing(Request &req, Response &res, Stream &strm, bool last
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read content into `req.body`
|
// Read content into `req.body`
|
||||||
if (!read_content(strm, last_connection, req, res)) {
|
if (req.method == "POST" || req.method == "PUT" || req.method == "PATCH" || req.method == "PRI") {
|
||||||
return false;
|
if (!read_content(strm, last_connection, req, res)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regular handler
|
// Regular handler
|
||||||
|
Loading…
x
Reference in New Issue
Block a user