(sock)
| 368 | """ |
| 369 | |
| 370 | def response_handler(sock): |
| 371 | consume_socket_content(sock, timeout=0.5) |
| 372 | sock.send( |
| 373 | b'HTTP/1.1 302 FOUND\r\n' |
| 374 | b'Content-Length: 0\r\n' |
| 375 | b'Location: /get#relevant-section\r\n\r\n' |
| 376 | ) |
| 377 | consume_socket_content(sock, timeout=0.5) |
| 378 | sock.send( |
| 379 | b'HTTP/1.1 302 FOUND\r\n' |
| 380 | b'Content-Length: 0\r\n' |
| 381 | b'Location: /final-url/\r\n\r\n' |
| 382 | ) |
| 383 | consume_socket_content(sock, timeout=0.5) |
| 384 | sock.send( |
| 385 | b'HTTP/1.1 200 OK\r\n\r\n' |
| 386 | ) |
| 387 | |
| 388 | close_server = threading.Event() |
| 389 | server = Server(response_handler, wait_to_close_event=close_server) |
nothing calls this directly
no test coverage detected
searching dependent graphs…