MCPcopy
hub / github.com/psf/requests / incomplete_chunked_response_handler

Function incomplete_chunked_response_handler

tests/test_lowlevel.py:42–51  ·  tests/test_lowlevel.py::incomplete_chunked_response_handler
(sock)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

consume_socket_contentFunction · 0.90
sendMethod · 0.45

Tested by

no test coverage detected