aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-01-25 19:41:22 +0100
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-02-04 09:52:04 +0100
commit735c79a2edb3b31a35ed3e484744807bb626ab77 (patch)
treeef49989901e51dcb573ca7f612ff267820650481 /libmproxy/protocol
parent4e9579e93eee4a156fa60c1d58dcc9b8c113d367 (diff)
downloadmitmproxy-735c79a2edb3b31a35ed3e484744807bb626ab77.tar.gz
mitmproxy-735c79a2edb3b31a35ed3e484744807bb626ab77.tar.bz2
mitmproxy-735c79a2edb3b31a35ed3e484744807bb626ab77.zip
increase coverage
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r--libmproxy/protocol/base.py2
-rw-r--r--libmproxy/protocol/http2.py13
-rw-r--r--libmproxy/protocol/tls.py2
3 files changed, 9 insertions, 8 deletions
diff --git a/libmproxy/protocol/base.py b/libmproxy/protocol/base.py
index 4eb034c0..40fcaf65 100644
--- a/libmproxy/protocol/base.py
+++ b/libmproxy/protocol/base.py
@@ -14,7 +14,7 @@ class _LayerCodeCompletion(object):
Dummy class that provides type hinting in PyCharm, which simplifies development a lot.
"""
- def __init__(self, **mixin_args): # pragma: nocover
+ def __init__(self, **mixin_args): # pragma: no cover
super(_LayerCodeCompletion, self).__init__(**mixin_args)
if True:
return
diff --git a/libmproxy/protocol/http2.py b/libmproxy/protocol/http2.py
index 03408142..54e7572e 100644
--- a/libmproxy/protocol/http2.py
+++ b/libmproxy/protocol/http2.py
@@ -249,12 +249,13 @@ class Http2SingleStreamLayer(_HttpTransmissionLayer, threading.Thread):
if path == '*' or path.startswith("/"):
form_in = "relative"
- elif method == 'CONNECT':
- form_in = "authority"
- if ":" in authority:
- host, port = authority.split(":", 1)
- else:
- host = authority
+ elif method == 'CONNECT': # pragma: no cover
+ # form_in = "authority"
+ # if ":" in authority:
+ # host, port = authority.split(":", 1)
+ # else:
+ # host = authority
+ raise NotImplementedError("CONNECT over HTTP/2 is not implemented.")
else:
form_in = "absolute"
# FIXME: verify if path or :host contains what we need
diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py
index af1a6055..ccae1661 100644
--- a/libmproxy/protocol/tls.py
+++ b/libmproxy/protocol/tls.py
@@ -349,7 +349,7 @@ class TlsLayer(Layer):
layer = self.ctx.next_layer(self)
layer()
- def __repr__(self):
+ def __repr__(self): # pragma: no cover
if self._client_tls and self._server_tls:
return "TlsLayer(client and server)"
elif self._client_tls: