requests
requests copied to clipboard
allow string/byte subtypes for header
We wrap our secret a in special subclass of string, that prevents leaking confidential information in some circumstances (i.e. stack traces) etc.
The current implementation of the header checks does a type(val) == str which is not recommended by PEP8.
Due to this implementation we can't pass this variables as headers. Converting them back to a normal string would defeat the purpose of wrapping them in the first place.
This PR fixes both issues.
Related to https://github.com/psf/requests/issues/6159 -> there is also another fix defined there.
Resolving as I believe this was fixed in Requests 2.29.0.