(self, server_conn, request_conn)
| 163 | |
| 164 | class 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 | |
| 182 | class RuleRouterTest(AsyncHTTPTestCase): |
nothing calls this directly
no test coverage detected