diff options
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r-- | libmproxy/protocol/base.py | 2 | ||||
-rw-r--r-- | libmproxy/protocol/http2.py | 13 | ||||
-rw-r--r-- | libmproxy/protocol/tls.py | 2 |
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: |