Martin Panter added the comment:

Personally I am skeptical if suggesting UTF-8 for the body data is a good idea, 
but I can go along with it, since other people want it. But I do strongly 
question whether it is right to suggest UTF-8 for header fields. The RFC 
<https://tools.ietf.org/html/rfc7230#page-26> only mentions ASCII and Latin-1.

Newer protocols based on HTTP (RTSP comes to mind) do specify UTF-8 for the 
header, but that is probably out of scope of both the HTTP module and 
beginner-targetted errors.

If I were redoing this patch, I would drop all the changes except at the 
body.encode() line in Emil’s original post.

----------
stage:  -> patch review

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26045>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to