You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Decode headers using utf-8 only if they are not str (#1020)
This commit is contained in:
@@ -77,7 +77,9 @@ class Session(BaseConfigDict):
|
||||
if value is None:
|
||||
continue # Ignore explicitly unset headers
|
||||
|
||||
value = value.decode('utf8')
|
||||
if type(value) is not str:
|
||||
value = value.decode('utf8')
|
||||
|
||||
if name.lower() == 'user-agent' and value.startswith('HTTPie/'):
|
||||
continue
|
||||
|
||||
|
Reference in New Issue
Block a user