Compare commits
No commits in common. "9846cc33707d9aac2d0d52f553b1274cbded2a55" and "eb1fa14665ddbae7dd5437c7bce4e3f6f6cfaa41" have entirely different histories.
9846cc3370
...
eb1fa14665
4
main.py
4
main.py
|
@ -32,9 +32,9 @@ def get_decoded_header(value):
|
||||||
decoded_header_items = decode_header(value)
|
decoded_header_items = decode_header(value)
|
||||||
decoded_header_value = ''
|
decoded_header_value = ''
|
||||||
for item in decoded_header_items:
|
for item in decoded_header_items:
|
||||||
decoded_item = item[0].decode(item[1], 'ignore') if item[1] is not None else item[0]
|
decoded_item = item[0].decode(item[1]) if item[1] is not None else item[0]
|
||||||
if isinstance(decoded_item, bytes):
|
if isinstance(decoded_item, bytes):
|
||||||
decoded_item = decoded_item.decode('ascii', 'ignore')
|
decoded_item = decoded_item.decode('ascii')
|
||||||
decoded_header_value += decoded_item
|
decoded_header_value += decoded_item
|
||||||
return decoded_header_value
|
return decoded_header_value
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue