コード例 #1
0
ファイル: http2.py プロジェクト: hymeca/mitmproxy-1
    def run(self):
        layer = httpbase.HttpLayer(self, self.mode)

        try:
            layer()
        except exceptions.Http2ZombieException:  # pragma: no cover
            pass
        except exceptions.ProtocolException as e:  # pragma: no cover
            self.log(repr(e), "info")
        except exceptions.SetServerNotAllowedException as e:  # pragma: no cover
            self.log("Changing the Host server for HTTP/2 connections not allowed: {}".format(e), "info")
        except exceptions.Kill:  # pragma: no cover
            self.log("Connection killed", "info")

        self.kill()
コード例 #2
0
ファイル: http2.py プロジェクト: zjdpf/mitmproxy
    def run(self):
        layer = httpbase.HttpLayer(self, self.mode)

        try:
            layer()
        except exceptions.Http2ZombieException:  # pragma: no cover
            # zombies can be safely terminated - no need to kill them twice
            return
        except exceptions.ProtocolException as e:  # pragma: no cover
            self.log(repr(e), "info")
        except exceptions.SetServerNotAllowedException as e:  # pragma: no cover
            self.log("Changing the Host server for HTTP/2 connections not allowed: {}".format(e), "info")
        except exceptions.Kill:  # pragma: no cover
            self.log(flow.Error.KILLED_MESSAGE, "info")

        self.kill()
コード例 #3
0
ファイル: http1.py プロジェクト: web-trump/softmock
 def __call__(self):
     layer = httpbase.HttpLayer(self, self.mode)
     layer()
コード例 #4
0
 def __call__(self):
     logging.info('http1: adding HttpLayer')
     layer = httpbase.HttpLayer(self, self.mode)
     layer()