mirror of
https://github.com/httpie/cli.git
synced 2025-03-13 06:18:33 +01:00
Merge a1c1d0d896
into 5b604c37c6
This commit is contained in:
commit
00a5b50d77
@ -293,6 +293,6 @@ def decode_raw_args(
|
|||||||
"""
|
"""
|
||||||
return [
|
return [
|
||||||
arg.decode(stdin_encoding)
|
arg.decode(stdin_encoding)
|
||||||
if type(arg) is bytes else arg
|
if isinstance(arg, bytes) else arg
|
||||||
for arg in args
|
for arg in args
|
||||||
]
|
]
|
||||||
|
@ -204,7 +204,7 @@ class Session(BaseConfigDict):
|
|||||||
continue # Ignore explicitly unset headers
|
continue # Ignore explicitly unset headers
|
||||||
|
|
||||||
original_value = value
|
original_value = value
|
||||||
if type(value) is not str:
|
if not isinstance(value, str):
|
||||||
value = value.decode()
|
value = value.decode()
|
||||||
|
|
||||||
if name.lower() == 'user-agent' and value.startswith('HTTPie/'):
|
if name.lower() == 'user-agent' and value.startswith('HTTPie/'):
|
||||||
|
Loading…
Reference in New Issue
Block a user