| 4439 | } |
| 4440 | |
| 4441 | inline bool expect_content(const Request &req) { |
| 4442 | if (req.method == "POST" || req.method == "PUT" || req.method == "PATCH" || |
| 4443 | req.method == "PRI" || req.method == "DELETE") { |
| 4444 | return true; |
| 4445 | } |
| 4446 | // TODO: check if Content-Length is set |
| 4447 | return false; |
| 4448 | } |
| 4449 | |
| 4450 | inline bool has_crlf(const std::string &s) { |
| 4451 | auto p = s.c_str(); |