You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Python 3 unicode fixes.
This commit is contained in:
@@ -104,7 +104,10 @@ class HTTPMessage(object):
|
||||
@property
|
||||
def content_type(self):
|
||||
"""Return the message content type."""
|
||||
return self._orig.headers.get('Content-Type', '')
|
||||
ct = self._orig.headers.get('Content-Type', '')
|
||||
if not isinstance(ct, str):
|
||||
ct = ct.decode('utf8')
|
||||
return ct
|
||||
|
||||
|
||||
class HTTPResponse(HTTPMessage):
|
||||
|
Reference in New Issue
Block a user