Handle HTTP 0.9 in response when formatting version.

Closes #170
This commit is contained in:
Jakub Roztocil 2014-04-28 00:08:20 +02:00
parent bd50a6adb1
commit 0e6875bf83

View File

@ -52,8 +52,9 @@ class HTTPResponse(HTTPMessage):
@property
def headers(self):
original = self._orig.raw._original_response
version = {9: '0.9', 10: '1.0', 11: '1.1'}[original.version]
status_line = 'HTTP/{version} {status} {reason}'.format(
version='.'.join(str(original.version)),
version=version,
status=original.status,
reason=original.reason
)