Open nollium opened 1 year ago
Is this repo still active? I just came across this today and can confirm that it is still an issue. It would be nice to fix this annoying bug, especially as it is a recommended package by requests.
There's no test for this fix to ensure it won't regress. The repository is still maintained but changes need tests
The header is parsed into a CaseInsensitiveDict which keys are specified to be strings, but it was here set to bytes. https://github.com/psf/requests/blob/51716c4ef390136b0d4b800ec7665dd5503e64fc/requests/structures.py#L20
This fix removes the encoding that converted the parsed keys back to bytes.