Skip to content
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(check_response): fallback to content-type without parameters #18

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

caugner
Copy link

@caugner caugner commented Mar 14, 2024

Currently, reqwest_eventsource cannot be used for endpoints that return content-type: application/json; charset=UTF-8", due to the following error: Invalid header value: "application/json; charset=UTF-8"

This is because the full header value is passed to mime::parse(), and mime only supports "application/json":

https://github.com/hyperium/mime/blob/938484de95445a2af931515d2b7252612c575da7/mime-parse/src/constants.rs#L461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant