diff options
author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-06-13 13:02:13 +0530 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-06-15 09:49:38 +0200 |
commit | 0f1aa2b78e1c22da16a482aedae4ed9800830007 (patch) | |
tree | 93c577f2a3e4f281bd0489ce6732c12f3af75e52 /netlib/http/http2/connections.py | |
parent | 26fe7dc87d83acca8541a618f105e6d5532cf55f (diff) | |
download | mitmproxy-0f1aa2b78e1c22da16a482aedae4ed9800830007.tar.gz mitmproxy-0f1aa2b78e1c22da16a482aedae4ed9800830007.tar.bz2 mitmproxy-0f1aa2b78e1c22da16a482aedae4ed9800830007.zip |
Py3: fix http2 bytes issue
Diffstat (limited to 'netlib/http/http2/connections.py')
-rw-r--r-- | netlib/http/http2/connections.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/http/http2/connections.py b/netlib/http/http2/connections.py index 8667d370..8f246feb 100644 --- a/netlib/http/http2/connections.py +++ b/netlib/http/http2/connections.py @@ -5,7 +5,7 @@ import time import hyperframe.frame from hpack.hpack import Encoder, Decoder -from netlib import utils +from netlib import utils, strutils from netlib.http import url import netlib.http.headers import netlib.http.response @@ -230,7 +230,7 @@ class HTTP2Protocol(object): headers = response.headers.copy() if ':status' not in headers: - headers.insert(0, b':status', str(response.status_code).encode('ascii')) + headers.insert(0, b':status', strutils.always_bytes(response.status_code)) if hasattr(response, 'stream_id'): stream_id = response.stream_id |