diff --git a/test/http2/test_http2_protocol.py b/test/http2/test_http2_protocol.py index 6a2754304..cb46bc68a 100644 --- a/test/http2/test_http2_protocol.py +++ b/test/http2/test_http2_protocol.py @@ -12,9 +12,10 @@ class EchoHandler(tcp.BaseHandler): sni = None def handle(self): - v = self.rfile.readline() - self.wfile.write(v) - self.wfile.flush() + while True: + v = self.rfile.safe_read(1) + self.wfile.write(v) + self.wfile.flush() class TestCheckALPNMatch(test.ServerTestBase):