aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-18 15:54:29 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-22 15:30:34 +0200
commit6d5a3da9294d5bc6758ded173729042573c9fe5f (patch)
treed2c7993787d4fb7d703bd90f2403ad69b548b186 /libpathod/pathod.py
parentcaaac5cd5a48d2bd1e50f0ff88c9d73a20ec9aa6 (diff)
downloadmitmproxy-6d5a3da9294d5bc6758ded173729042573c9fe5f.tar.gz
mitmproxy-6d5a3da9294d5bc6758ded173729042573c9fe5f.tar.bz2
mitmproxy-6d5a3da9294d5bc6758ded173729042573c9fe5f.zip
use new HTTP/1 protocol
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index cfedc934..f8607cca 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -123,11 +123,12 @@ class PathodHandler(tcp.BaseHandler):
"""
with logger.ctx() as lg:
if self.use_http2:
- stream_id, headers, body = self.protocol.read_request()
- method = headers[':method']
- path = headers[':path']
- headers = odict.ODict(headers)
- httpversion = ""
+ req = self.protocol.read_request()
+ method = req.method
+ path = req.path
+ headers = odict.ODictCaseless(req.headers)
+ httpversion = req.httpversion
+ stream_id = req.stream_id
else:
req = self.protocol.read_request(lg)
if 'next_handle' in req: