-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Accept-Encoding parsing #352
Comments
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 |
I'm pretty sure that's not true. It prefers the smallest response size: |
Hmm, that's not the behaviour I was seeing yesterday! Perhaps nginx is interfering somehow... |
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: