This commit is contained in:
chrysle 2025-01-27 14:33:58 +00:00 committed by GitHub
commit 00a5b50d77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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
] ]

View File

@ -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/'):