MCPcopy
hub / github.com/tornadoweb/tornado / read_headers

Method read_headers

tornado/test/httpserver_test.py:971–976  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

969
970 @gen.coroutine
971 def read_headers(self):
972 first_line = yield self.stream.read_until(b"\r\n")
973 self.assertTrue(first_line.startswith(b"HTTP/1.1 200"), first_line)
974 header_bytes = yield self.stream.read_until(b"\r\n\r\n")
975 headers = HTTPHeaders.parse(header_bytes.decode("latin1"))
976 raise gen.Return(headers)
977
978 @gen.coroutine
979 def read_response(self):

Calls 2

read_untilMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected