mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Fix HTTP proxy server: block socket while reading
This commit is contained in:
parent
dd5eba48be
commit
d546ada07a
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue