commit
8aac206bae
|
@ -28,8 +28,10 @@ class Requester(object):
|
||||||
|
|
||||||
# Parse headers
|
# Parse headers
|
||||||
content = content.split('\n')
|
content = content.split('\n')
|
||||||
for header in content[1:-2]:
|
for header in content[1:]:
|
||||||
name, value = header.split(': ')
|
name, _, value = header.partition(': ')
|
||||||
|
if not name or not value:
|
||||||
|
continue
|
||||||
self.headers[name] = value
|
self.headers[name] = value
|
||||||
self.host = self.headers['Host']
|
self.host = self.headers['Host']
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue