From d546ada07ac62361eeff372e7d9d2a999fd42e7b Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 4 Mar 2026 21:36:07 +0000 Subject: [PATCH] Fix HTTP proxy server: block socket while reading --- ncat/ncat_proxy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ncat/ncat_proxy.c b/ncat/ncat_proxy.c index c6577e128..93d8b0606 100644 --- a/ncat/ncat_proxy.c +++ b/ncat/ncat_proxy.c @@ -307,6 +307,7 @@ static void http_server_handler(int c) } } #endif + block_socket(sock.fdn.fd); code = http_read_request_line(&sock, &buf); if (code != 0) { @@ -386,6 +387,8 @@ static void http_server_handler(int c) } } + unblock_socket(sock.fdn.fd); + if (strcmp(request.method, "CONNECT") == 0) { code = handle_connect(&sock, &request); } else if (strcmp(request.method, "GET") == 0