5a7ca0
diff -up nmap-6.40/ncat/ncat_connect.c.logdebug nmap-6.40/ncat/ncat_connect.c
5a7ca0
--- nmap-6.40/ncat/ncat_connect.c.logdebug	2013-08-08 16:49:23.541312607 +0200
5a7ca0
+++ nmap-6.40/ncat/ncat_connect.c	2013-08-08 16:50:07.311943322 +0200
5a7ca0
@@ -420,7 +420,8 @@ static int do_proxy_http(void)
5a7ca0
         goto bail;
5a7ca0
     }
5a7ca0
     code = http_parse_status_line_code(status_line);
5a7ca0
-    logdebug("Proxy returned status code %d.\n", code);
5a7ca0
+    if (o.debug)
5a7ca0
+        logdebug("Proxy returned status code %d.\n", code);
5a7ca0
     free(status_line);
5a7ca0
     status_line = NULL;
5a7ca0
     if (http_read_header(&sockbuf, &header) != 0) {
5a7ca0
@@ -461,7 +462,8 @@ static int do_proxy_http(void)
5a7ca0
             http_challenge_free(&challenge);
5a7ca0
             goto bail;
5a7ca0
         }
5a7ca0
-        logdebug("Reconnection header:\n%s", request);
5a7ca0
+        if (o.debug)
5a7ca0
+            logdebug("Reconnection header:\n%s", request);
5a7ca0
         if (send(sd, request, n, 0) < 0) {
5a7ca0
             loguser("Error sending proxy request: %s.\n", socket_strerror(socket_errno()));
5a7ca0
             free(request);
5a7ca0
@@ -478,7 +480,8 @@ static int do_proxy_http(void)
5a7ca0
             goto bail;
5a7ca0
         }
5a7ca0
         code = http_parse_status_line_code(status_line);
5a7ca0
-        logdebug("Proxy returned status code %d.\n", code);
5a7ca0
+        if (o.debug)
5a7ca0
+            logdebug("Proxy returned status code %d.\n", code);
5a7ca0
         free(status_line);
5a7ca0
         status_line = NULL;
5a7ca0
         if (http_read_header(&sockbuf, &header) != 0) {