From 6d5a3da9294d5bc6758ded173729042573c9fe5f Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 18 Jul 2015 15:54:29 +0200 Subject: use new HTTP/1 protocol --- libpathod/pathod.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libpathod/pathod.py') 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: -- cgit v1.2.3