type -> isinstance
This commit is contained in:
parent
7e6c92dc52
commit
00b5a496dd
|
@ -97,9 +97,10 @@ class HTTPResponse:
|
||||||
headers = b''
|
headers = b''
|
||||||
if self.headers:
|
if self.headers:
|
||||||
headers = b''.join(
|
headers = b''.join(
|
||||||
b'%b: %b\r\n' % (name.encode(), str(value).encode('utf-8'))
|
|
||||||
if type(value) != Cookie else
|
|
||||||
b'%b: %b\r\n' % (name.encode(), value.encode('utf-8'))
|
b'%b: %b\r\n' % (name.encode(), value.encode('utf-8'))
|
||||||
|
if isinstance(value, str) or isinstance(value, Cookie)
|
||||||
|
else b'%b: %b\r\n' % (name.encode(),
|
||||||
|
str(value).encode('utf-8'))
|
||||||
for name, value in self.headers.items()
|
for name, value in self.headers.items()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user