aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/protocols/http2.py
diff options
context:
space:
mode:
Diffstat (limited to 'pathod/protocols/http2.py')
-rw-r--r--pathod/protocols/http2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pathod/protocols/http2.py b/pathod/protocols/http2.py
index 5ad120de..7b162664 100644
--- a/pathod/protocols/http2.py
+++ b/pathod/protocols/http2.py
@@ -6,7 +6,7 @@ import time
import hyperframe.frame
from hpack.hpack import Encoder, Decoder
-from netlib import utils, strutils
+from netlib import utils
from netlib.http import http2
import netlib.http.headers
import netlib.http.response
@@ -201,7 +201,7 @@ class HTTP2StateProtocol(object):
headers = response.headers.copy()
if ':status' not in headers:
- headers.insert(0, b':status', strutils.always_bytes(response.status_code))
+ headers.insert(0, b':status', str(response.status_code).encode())
if hasattr(response, 'stream_id'):
stream_id = response.stream_id
@@ -254,7 +254,7 @@ class HTTP2StateProtocol(object):
def read_frame(self, hide=False):
while True:
- frm = http2.framereader.http2_read_frame(self.tcp_handler.rfile)
+ frm = http2.parse_frame(*http2.read_raw_frame(self.tcp_handler.rfile))
if not hide and self.dump_frames: # pragma no cover
print(frm.human_readable("<<"))