Fix HTTP proxy server: block socket while reading

This commit is contained in:
dmiller 2026-03-04 21:36:07 +00:00
parent dd5eba48be
commit d546ada07a

View file

@ -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