MCPcopy Create free account
hub / github.com/EasyIME/PIME / read_headers

Method read_headers

python/python3/tornado/test/httpserver_test.py:840–845  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

838
839 @gen.coroutine
840 def read_headers(self):
841 first_line = yield self.stream.read_until(b"\r\n")
842 self.assertTrue(first_line.startswith(b"HTTP/1.1 200"), first_line)
843 header_bytes = yield self.stream.read_until(b"\r\n\r\n")
844 headers = HTTPHeaders.parse(header_bytes.decode("latin1"))
845 raise gen.Return(headers)
846
847 @gen.coroutine
848 def read_response(self):

Calls 2

read_untilMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected