requests / toolbelt

A toolbelt of useful classes and functions to be used with python-requests
https://toolbelt.readthedocs.org
Other
1k stars 186 forks source link

Fix wrong key type in multipart decoder #353

Open nollium opened 1 year ago

nollium commented 1 year ago

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.

John-P commented 9 months 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.

sigmavirus24 commented 9 months ago

There's no test for this fix to ensure it won't regress. The repository is still maintained but changes need tests