You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently invalid values like gzip brotli spam still pass, and valid values like gzip;q=0 ("don't send me gzip") are intepreted as "send me gzip". Also the "no encoding" case relies on matching r"" within the string (?).
The header should be parsed correctly. Logic can be borrowed from Django's request.accepts().
The text was updated successfully, but these errors were encountered:
This is a very valid point. Also along the same lines, if multiple encodings are available (e.g. gzip and brotli), whitenoise does not choose sensibly between them. Chrome for example sends Accept-Encoding: gzip, deflate, br which means all of those encodings are equally acceptable, and yet whitenoise treats it as "gzip by preference" (because it's earlier in the list), so despite the good work put in to make it support brotli, in practice the brotli versions will never be used - which is a shame given brotli is up to one hundred times better than gzip! Given whitenoise has the file sizes immediately available to it, it would seem only sensible for it to choose the smallest file from amongst the equally-acceptable encodings.
Currently invalid values like
gzip brotli spam
still pass, and valid values likegzip;q=0
("don't send me gzip") are intepreted as "send me gzip". Also the "no encoding" case relies on matchingr""
within the string (?).The header should be parsed correctly. Logic can be borrowed from Django's
request.accepts()
.The text was updated successfully, but these errors were encountered: