Skip to content

Commit

Permalink
[1.26] Don't compare bytes and str in putheader()
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored and sethmlarson committed Jan 26, 2021
1 parent b89158f commit cb5e2fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/urllib3/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def putrequest(self, method, url, *args, **kwargs):

def putheader(self, header, *values):
""""""
if SKIP_HEADER not in values:
if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
_HTTPConnection.putheader(self, header, *values)
elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
raise ValueError(
Expand Down

0 comments on commit cb5e2fc

Please sign in to comment.