You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the sent header value does not match with the actual value: Serviços
This is due to the fact that aiohttp uses utf-8 for encoding headers.
Describe the solution you'd like
It looks like it will be enough to pass "encoding" parameter to the http_writer._serialize_headers function through either aiohttp.ClientSession or aiohttp.ClientRequest (or any other better way).
Describe alternatives you've considered
Currently I had to inherit StreamWriter and ClientRequest in my code and overwrite StreamWriter.write_headers function for it to use latin-1.
Related component
Client
Additional context
If that feature looks fine then I could probably take it and send a PR.
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
I have a case where I need to send some non-ASCII characters through headers.
But the sent header value does not match with the actual value:
Serviços
This is due to the fact that aiohttp uses utf-8 for encoding headers.
Describe the solution you'd like
It looks like it will be enough to pass "encoding" parameter to the
http_writer._serialize_headers
function through eitheraiohttp.ClientSession
oraiohttp.ClientRequest
(or any other better way).Describe alternatives you've considered
Currently I had to inherit
StreamWriter
andClientRequest
in my code and overwriteStreamWriter.write_headers
function for it to uselatin-1
.Related component
Client
Additional context
If that feature looks fine then I could probably take it and send a PR.
Code of Conduct
The text was updated successfully, but these errors were encountered: