py3: fix bytes vs. str

This commit is contained in:
Thomas Kriechbaumer
2016-07-03 19:04:16 +02:00
parent 45aa2174e2
commit 23e295b37e
2 changed files with 9 additions and 9 deletions

View File

@@ -2,10 +2,10 @@ from netlib.http import url
def parse_headers(headers):
authority = headers.get(':authority', b'')
method = headers.get(':method', b'GET')
scheme = headers.get(':scheme', b'https')
path = headers.get(':path', b'/')
authority = headers.get(':authority', '').encode()
method = headers.get(':method', 'GET').encode()
scheme = headers.get(':scheme', 'https').encode()
path = headers.get(':path', '/').encode()
headers.clear(":method")
headers.clear(":scheme")