(self, headers, body, newline=b"\r\n")
| 253 | return Application(self.get_handlers()) |
| 254 | |
| 255 | def raw_fetch(self, headers, body, newline=b"\r\n"): |
| 256 | with closing(IOStream(socket.socket())) as stream: |
| 257 | self.io_loop.run_sync( |
| 258 | lambda: stream.connect(("127.0.0.1", self.get_http_port())) |
| 259 | ) |
| 260 | stream.write( |
| 261 | newline.join(headers + [utf8("Content-Length: %d" % len(body))]) |
| 262 | + newline |
| 263 | + newline |
| 264 | + body |
| 265 | ) |
| 266 | start_line, headers, body = self.io_loop.run_sync( |
| 267 | lambda: read_stream_body(stream) |
| 268 | ) |
| 269 | return body |
| 270 | |
| 271 | def test_multipart_form(self): |
| 272 | # Encodings here are tricky: Headers are latin1, bodies can be |
no test coverage detected