-
Notifications
You must be signed in to change notification settings - Fork 31
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 charset UTF-8 to template exception #28
Conversation
I believe it's better solved by specifying correct content type for responses. |
hm, could we get rid from |
@jettify Well, I removed it. If it is clear why this is necessary, you can always add |
response = web.Response(body=body, status=500) | ||
response = web.Response( | ||
body=body, status=500, | ||
content_type='text/html; charset=utf-8') |
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.
The patch is wrong, sorry.
content_type
parameter is for type only, not charset.
Ctor adds ; charset=utf-8
to given parameter ultimately: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/web_reqrep.py#L742-L748
content_type='text/html'
should be enough.
Perhaps we need charset param for aiohttp.web.Response
ctor, I'll file the issue.
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.
@asvetlov Thanks for clarification
before:
after: