| 401 | b'get /path HTTP/1.1\r\ntest: line\r\ntest2: data\r\n\r\n') |
| 402 | |
| 403 | def test_http_request_parser(self): |
| 404 | out = aiohttp.FlowControlDataQueue(self.stream) |
| 405 | buf = aiohttp.ParserBuffer() |
| 406 | p = protocol.HttpRequestParser()(out, buf) |
| 407 | next(p) |
| 408 | try: |
| 409 | p.send(b'get /path HTTP/1.1\r\n\r\n') |
| 410 | except StopIteration: |
| 411 | pass |
| 412 | result = out._buffer[0][0] |
| 413 | self.assertEqual( |
| 414 | ('GET', '/path', (1, 1), CIMultiDict(), [], False, None), |
| 415 | result) |
| 416 | |
| 417 | def test_http_request_parser_utf8(self): |
| 418 | out = aiohttp.FlowControlDataQueue(self.stream) |