aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--netlib/http/http2/connections.py4
-rw-r--r--test/http/http2/test_connections.py16
2 files changed, 10 insertions, 10 deletions
diff --git a/netlib/http/http2/connections.py b/netlib/http/http2/connections.py
index 5e877286..52fa7193 100644
--- a/netlib/http/http2/connections.py
+++ b/netlib/http/http2/connections.py
@@ -129,7 +129,7 @@ class HTTP2Protocol(object):
host.encode('ascii'),
port,
path.encode('ascii'),
- b'2.0',
+ b"HTTP/2.0",
headers,
body,
timestamp_start,
@@ -171,7 +171,7 @@ class HTTP2Protocol(object):
timestamp_end = None
response = Response(
- b'2.0',
+ b"HTTP/2.0",
int(headers.get(':status', 502)),
b'',
headers,
diff --git a/test/http/http2/test_connections.py b/test/http/http2/test_connections.py
index 22a43266..a115fc7c 100644
--- a/test/http/http2/test_connections.py
+++ b/test/http/http2/test_connections.py
@@ -414,7 +414,7 @@ class TestReadResponse(tservers.ServerTestBase):
resp = protocol.read_response(NotImplemented, stream_id=42)
- assert resp.http_version == '2.0'
+ assert resp.http_version == "HTTP/2.0"
assert resp.status_code == 200
assert resp.msg == ''
assert resp.headers.fields == [[b':status', b'200'], [b'etag', b'foobar']]
@@ -441,7 +441,7 @@ class TestReadEmptyResponse(tservers.ServerTestBase):
resp = protocol.read_response(NotImplemented, stream_id=42)
assert resp.stream_id == 42
- assert resp.http_version == '2.0'
+ assert resp.http_version == "HTTP/2.0"
assert resp.status_code == 200
assert resp.msg == ''
assert resp.headers.fields == [[b':status', b'200'], [b'etag', b'foobar']]
@@ -459,7 +459,7 @@ class TestAssembleRequest(object):
b'',
b'',
b'/',
- b'2.0',
+ b"HTTP/2.0",
None,
None,
))
@@ -474,7 +474,7 @@ class TestAssembleRequest(object):
b'',
b'',
b'/',
- b'2.0',
+ b"HTTP/2.0",
None,
None,
)
@@ -491,7 +491,7 @@ class TestAssembleRequest(object):
b'',
b'',
b'/',
- b'2.0',
+ b"HTTP/2.0",
http.Headers([(b'foo', b'bar')]),
b'foobar',
))
@@ -507,7 +507,7 @@ class TestAssembleResponse(object):
def test_simple(self):
bytes = HTTP2Protocol(self.c, is_server=True).assemble_response(http.Response(
- b'2.0',
+ b"HTTP/2.0",
200,
))
assert len(bytes) == 1
@@ -516,7 +516,7 @@ class TestAssembleResponse(object):
def test_with_stream_id(self):
resp = http.Response(
- b'2.0',
+ b"HTTP/2.0",
200,
)
resp.stream_id = 0x42
@@ -527,7 +527,7 @@ class TestAssembleResponse(object):
def test_with_body(self):
bytes = HTTP2Protocol(self.c, is_server=True).assemble_response(http.Response(
- b'2.0',
+ b"HTTP/2.0",
200,
b'',
http.Headers(foo=b"bar"),