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

Function multiple_content_length_response_handler

tests/test_lowlevel.py:104–115  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

102 """
103
104 def multiple_content_length_response_handler(sock):
105 request_content = consume_socket_content(sock, timeout=0.5)
106 response = (
107 b"HTTP/1.1 200 OK\r\n"
108 b"Content-Type: text/plain\r\n"
109 b"Content-Length: 16\r\n"
110 b"Content-Length: 32\r\n\r\n"
111 b"-- Bad Actor -- Original Content\r\n"
112 )
113 sock.send(response)
114
115 return request_content
116
117 close_server = threading.Event()
118 server = Server(multiple_content_length_response_handler)

Callers

nothing calls this directly

Calls 2

consume_socket_contentFunction · 0.90
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…