Hi Jay, On Fri, Mar 14, 2014 at 01:51:13PM -0700, Jay Christopherson wrote: > It appears that HAproxy is not honoring q-values in the Accept-Encoding > header, when requesting compression.
Indeed. The basic fix is not hard to do, but we're normally supposed to also support "q=0", and ideally to respect the client's choice, so that becomes slightly more complicated. I started doing it when reading your e-mail and stopped since I don't have the time right now. If someone wants to take a look at it, it's in proto_http.c, function select_compression_request_header(). We need to cut the accept-encoding token on the semi-colon, check if the token is known, then if a q-value is present, either it's zero and we must skip it, or we must compare it to the previous q-value and remember it only if it's strictly greater than any previous one. If no q-value is specified, it equals 1.000. I think we can increase the ratio of compressed responses using this because it's very likely that some browsers send q=<something> that is not matched. Willy

