def test_prior_knowledge(self):
        with taddons.context() as tctx:
            a = disable_h2c.DisableH2C()
            tctx.configure(a)

            b = io.BytesIO(b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n")
            f = tflow.tflow()
            f.request = http.HTTPRequest.wrap(http1.read_request(b))
            f.intercept()

            a.request(f)
            assert not f.killable
            assert f.reply.value == Kill
示例#2
0
 def read_request(self, lg=None):
     return http1.read_request(self.pathod_handler.rfile)