No gzip compression for HTTP status code 202

hpuac nginx-forum at forum.nginx.org
Tue Dec 4 10:56:00 UTC 2018


Hey nginx team,

I noticed that the ngx_http_gzip_module is not compressing the response body
if the HTTP response status code is 202 (Accepted).
After having a look at the code, it looks like the filter is only active if
the status code is 200, 403 or 404.
(
https://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_gzip_filter_module.c#L249
)
Is there any particular reason to not compress other status codes?
And if not, could we adjust this logic to also compress others, for example
everything except 204 (No Content)?

Best regards, 
Hans

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,282249,282249#msg-282249



More information about the nginx mailing list