예제 #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()