mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Changed to return 415 instead of 406 for invalid Content-Encoding.
This commit is contained in:
parent
ebe40a7d94
commit
66550eb71b
1 changed files with 2 additions and 2 deletions
|
@ -706,7 +706,7 @@ inline const char* status_message(int status)
|
|||
case 200: return "OK";
|
||||
case 400: return "Bad Request";
|
||||
case 404: return "Not Found";
|
||||
case 406: return "Not Acceptable";
|
||||
case 415: return "Unsupported Media Type";
|
||||
default:
|
||||
case 500: return "Internal Server Error";
|
||||
}
|
||||
|
@ -1712,7 +1712,7 @@ inline bool Server::process_request(Stream& strm, bool last_connection)
|
|||
detail::decompress_request_body(req);
|
||||
#else
|
||||
if (req.get_header_value("Content-Encoding") == "gzip") {
|
||||
res.status = 406;
|
||||
res.status = 415;
|
||||
write_response(strm, last_connection, req, res);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue