mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-11 13:44:02 +00:00
Changed to return 415 instead of 406 for invalid Content-Encoding.
This commit is contained in:
parent
ebe40a7d94
commit
66550eb71b
@ -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…
x
Reference in New Issue
Block a user