Skip to content

Commit

Permalink
Don't compare bytes and str in putheader()
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Jan 26, 2021
1 parent d0b2076 commit e47d3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/urllib3/connection.py
Expand Up @@ -184,7 +184,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):
super().putheader(header, *values)
elif to_str(header.lower()) not in SKIPPABLE_HEADERS:
raise ValueError(
Expand Down

0 comments on commit e47d3e7

Please sign in to comment.