-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add API that will allow/deny/warn automatic decoding of json based on content-type. #1723
Labels
Comments
makes sense |
fafhrd91
added a commit
that referenced
this issue
Mar 17, 2017
added |
What about |
@pnuckowski it is not standard (i.e. RFC recommended) content-type. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Now, aiohttp issue warning if
await response.json()
called and response does not contain correct content-type.This should be configurable. I suggest to to require
content_type.startswith('application/json')
. Aiohttp's users must be able to turn this check off and also specify his own MIME-type that should pass this check. I understand, that many broken HTTP-servers give JSON-response without setting correct content-type. I think, we should fight against these servers.The text was updated successfully, but these errors were encountered: