-
Notifications
You must be signed in to change notification settings - Fork 329
Open
Description
It seems like UTF-8 content in response headers causes an error due to the following code:
for header in response_headers:
towrite.append(('%s: %s\r\n' % header).encode('latin-1'))
I can't find a spec saying that response header values have to be Latin-1, I'm not the only one for whom it does not seem to be specified. In the case of H2 the RFC says: "Just as in HTTP/1.x, header field names are strings of ASCII characters".
This leads me to believe that the values should not be forcefully encoded as Latin-1
, valid UTF-8 should pass through unmodified. Alternatively, for ease-of-use, eventlet should %-encode any UTF-8 values instead of erroring out like this.
Metadata
Metadata
Assignees
Labels
No labels