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

Method get

tornado/test/simple_httpclient_test.py:126–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124
125class NoContentLengthHandler(RequestHandler):
126 def get(self):
127 if self.request.version.startswith("HTTP/1"):
128 # Emulate the old HTTP/1.0 behavior of returning a body with no
129 # content-length. Tornado handles content-length at the framework
130 # level so we have to go around it.
131 stream = self.detach()
132 stream.write(b"HTTP/1.0 200 OK\r\n\r\n" b"hello")
133 stream.close()
134 else:
135 self.finish("HTTP/1 required")
136
137
138class EchoPostHandler(RequestHandler):

Callers

nothing calls this directly

Calls 4

detachMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected