Welcome! Log In Create A New Profile

Advanced

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

August 03, 2011 02:17PM
Hi Igor, thanks for the quick patch. This patch is different than the nginx-1.1.0 code. I assume the 1.1.0 code supersedes the patch as it was posted later. If not, disregard.

The nginx-1.1.0 code has a bug in it. ( from a glance the patch would have been ok )

nginx-1.1.0 does not handle the case for "gzip;q=1.0" correctly. It should compress and it does not.

I see that the code is exhaustive in it's validation of the 0.??? case, but does not work for 1.0 1.00 1.000. ( just "1" is ok )

My quick hack to correct this was..

- if (p == last || *p == ',' || *p == ' ' ) {
+ if (p == last || *p == ',' || *p == ' ' || *p == '.') {


I took a quick log this morning from a production box of the most frequent accept-encoding requests and the gzip;q=1.0 case is common.
In order of descending frequency...

Accept-Encoding: gzip, deflate
Accept-Encoding: gzip,deflate,sdch
Accept-Encoding: gzip,deflate
Accept-Encoding: gzip
Accept-Encoding: gzip, x-gzip
Accept-Encoding:
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Accept-Encoding: identity
Accept-Encoding: gzip;q=1.0, deflate;q=0.8, chunked;q=0.6, identity;q=0.4, *;q=0
Accept-Encoding: deflate, gzip
Accept-Encoding: x-gzip, gzip, deflate
Accept-Encoding: identity,gzip,deflate
Accept-Encoding: gzip, deflate, x-gzip, identity; q=0.9
Accept-Encoding: gzip;q=1.0, deflate;q=0.8, chunked;q=0.6
Accept-Encoding: identity; q=1
....

Radek
Subject Author Posted

Bug in supporting Quality zero (negate) parameter in Accept-Encoding

Radek Burkat July 29, 2011 02:04PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

Igor Sysoev July 29, 2011 02:08PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

rburkat July 29, 2011 03:11PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

rburkat July 29, 2011 03:44PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

António P. P. Almeida July 29, 2011 03:30PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

Igor Sysoev July 31, 2011 01:40PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

António P. P. Almeida July 29, 2011 04:24PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

Igor Sysoev July 31, 2011 01:42PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

rburkat August 03, 2011 02:17PM

Re: Bug in supporting Quality zero (negate) parameter in Accept-Encoding

Igor Sysoev August 04, 2011 11:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready