[BUG] Gunzip module may cause requests to fail
Maxim Dounin
mdounin at mdounin.ru
Tue Dec 1 13:28:36 UTC 2015
Hello!
On Tue, Dec 01, 2015 at 07:55:22AM +0000, Aviram Cohen wrote:
> Maxim, great hearing from you.
> I have said that the response is a bit malformed, which means
> for me that even though it looks weird, it can be handled.
> You are right that when Nginx gets unpredicted behaviors from the server/client, it should close the connection so that there won't be any damage.
> However, this is an error that Nginx could have easily avoided.
"Just a little bit pregnant" (c)
The response is malformed, and nobody knows how it is expected to
look like if it wasn't malformed.
> Besides, this is not an explicit Nginx behavior, as Nginx is not aware that it got an empty response with the gzip header.
> It happens implicitly due to a calculation of data size, which happens to be zero. The error log doesn't show a backend server error, but a zlib error.
> This all suggests an obvious Nginx bug, and doesn't sound to me like the desired Nginx behavior.
The error happens when gunzipping the response, and it's
irrelevant if it was obtained from a backend or from disk.
The error says "inflate() returned ... on response end", and it is
belived to be clear enough and in line with other errors reported
by gunzip filter. If you think the error message can be improved -
feel free to suggest patches.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list