-
Notifications
You must be signed in to change notification settings - Fork 168
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
Fix parsing of Accept-Encoding
request header
#220
Conversation
* Add unit tests to content_encoding * Represent quality values (qvalues) by a separate type * Parse encodings case-insensitively * Parse qvalues as specified in RFC 7231 section 5.3.1 Refs: #215
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pr! Great find and sorry for the long review delay. Have had a lot of other things on my plate. I will be faster in any follow ups on this.
This syntax is not supported in rust 1.51 (the minimum toolchain version).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! thank you @davidpdrsn do you want to add anything?
* Fix parsing of Accept-Encoding request header * Add unit tests to content_encoding * Represent quality values (qvalues) by a separate type * Parse encodings case-insensitively * Parse qvalues as specified in RFC 7231 section 5.3.1 Refs: #215 * Do not use or-pattern syntax This syntax is not supported in rust 1.51 (the minimum toolchain version). * Add comments to QValue::parse * Remove redundant SupportedEncodingsAll::new function * Add unit tests for all content-encodings (gzip, deflate, br)
* Release 0.2.4 - Added `CatchPanic` middleware which catches panics and converts them into `500 Internal Server` responses ([#214]) [#214]: #214 * Fix parsing of `Accept-Encoding` request header (#220) * Fix parsing of Accept-Encoding request header * Add unit tests to content_encoding * Represent quality values (qvalues) by a separate type * Parse encodings case-insensitively * Parse qvalues as specified in RFC 7231 section 5.3.1 Refs: #215 * Do not use or-pattern syntax This syntax is not supported in rust 1.51 (the minimum toolchain version). * Add comments to QValue::parse * Remove redundant SupportedEncodingsAll::new function * Add unit tests for all content-encodings (gzip, deflate, br) * Update changelog * add changelog groups Co-authored-by: Martin Dickopp <martin@zero-based.org>
Motivation
This PR fixes some of the issues described in bug report #215, in particular those related to parsing the
Accept-Encoding
header (cases 1, 2, 3, and 5).Solution