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

Method start_request

python/python3/tornado/test/routing_test.py:165–179  ·  view source on GitHub ↗
(self, server_conn, request_conn)

Source from the content-addressed store, hash-verified

163
164class ConnectionDelegate(HTTPServerConnectionDelegate):
165 def start_request(self, server_conn, request_conn):
166 class MessageDelegate(HTTPMessageDelegate):
167 def __init__(self, connection):
168 self.connection = connection
169
170 def finish(self):
171 response_body = b"OK"
172 self.connection.write_headers(
173 ResponseStartLine("HTTP/1.1", 200, "OK"),
174 HTTPHeaders({"Content-Length": str(len(response_body))}),
175 )
176 self.connection.write(response_body)
177 self.connection.finish()
178
179 return MessageDelegate(request_conn)
180
181
182class RuleRouterTest(AsyncHTTPTestCase):

Callers

nothing calls this directly

Calls 1

MessageDelegateClass · 0.70

Tested by

no test coverage detected