(sock)
| 40 | class="st">""class="st">"get a ChunkedEncodingError if the server returns a bad response"class="st">"" |
| 41 | |
| 42 | def incomplete_chunked_response_handler(sock): |
| 43 | request_content = consume_socket_content(sock, timeout=0.5) |
| 44 | |
| 45 | class="cm"># The server never ends the request and doesn't provide any valid chunks |
| 46 | sock.send( |
| 47 | bclass="st">"HTTP/1.1 200 OK\r\n" |
| 48 | bclass="st">"Transfer-Encoding: chunked\r\n" |
| 49 | ) |
| 50 | |
| 51 | return request_content |
| 52 | |
| 53 | close_server = threading.Event() |
| 54 | server = Server(incomplete_chunked_response_handler) |
nothing calls this directly
no test coverage detected