-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement accept
header parsing?
#4
Comments
@glasser Thanks for your nice proposal! |
@picoHz Thank you! If you want to be really picking, |
@glasser It's a good point. Backslash-escaping has been supported as of |
@picoHz is it intentional that My expectation is that any implicit items remain in provided order and any explicit items are reordered in accordance with their relative For example, this would order Accept: audio/*; q=0.2, audio/basic |
@maxcountryman |
@picoHz is this meant to parse Without |
Without input from @picoHz it's unclear what the intent here is but regardless I've put together a parser for |
There doesn't seem to be a great Rust implementation of
accept
header parsing. Accept headers are basically a comma-separated list of media types, and so you'd think you can just split on comma and then parse each piece with a library like your library or themime
library.But commas can exist inside quoted parameters, so this is technically incorrect.
There are several common implementations that get this wrong. It would be great if a library could just solve this once and for all, and since
mime
seems to be unmaintained, maybe your library could be that place?The text was updated successfully, but these errors were encountered: