Simple handler that will take request and echo it back to requester.
(sock)
| 10 | |
| 11 | |
| 12 | def echo_response_handler(sock): |
| 13 | class="st">""class="st">"Simple handler that will take request and echo it back to requester."class="st">"" |
| 14 | request_content = consume_socket_content(sock, timeout=0.5) |
| 15 | |
| 16 | text_200 = ( |
| 17 | bclass="st">"HTTP/1.1 200 OK\r\n" |
| 18 | bclass="st">"Content-Length: %d\r\n\r\n" |
| 19 | bclass="st">"%s" |
| 20 | ) % (len(request_content), request_content) |
| 21 | sock.send(text_200) |
| 22 | |
| 23 | |
| 24 | def test_chunked_upload(): |
nothing calls this directly
no test coverage detected