Change HTTP connection type to 'close' in -R mode
authorMichael Rash <mbr@cipherdyne.org>
Thu, 2 Aug 2012 03:27:34 +0000 (23:27 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Thu, 2 Aug 2012 03:27:34 +0000 (23:27 -0400)
Applied patch from Jonathan Schulz to change the HTTP connection type to
'close' for the client in -R mode.

client/http_resolve_host.c
client/spa_comm.c

index 9282437..cac9198 100644 (file)
@@ -170,7 +170,7 @@ resolve_ip_http(fko_cli_options_t *options)
     */
     snprintf(http_buf, HTTP_MAX_REQUEST_LEN,
         "GET %s HTTP/1.0\r\nUser-Agent: %s\r\nAccept: */*\r\n"
-        "Host: %s\r\nConnection: Keep-Alive\r\n\r\n",
+        "Host: %s\r\nConnection: close\r\n\r\n",
         url.path,
         options->http_user_agent,
         url.host
index 92de1c9..7d70cee 100644 (file)
@@ -446,7 +446,7 @@ send_spa_packet_http(const char *spa_data, const int sd_len,
     {
         snprintf(http_buf, HTTP_MAX_REQUEST_LEN,
             "GET /%s HTTP/1.0\r\nUser-Agent: %s\r\nAccept: */*\r\n"
-            "Host: %s\r\nConnection: Keep-Alive\r\n\r\n",
+            "Host: %s\r\nConnection: close\r\n\r\n",
             spa_data_copy,
             options->http_user_agent,
             options->spa_server_str  /* hostname or IP */
@@ -479,7 +479,7 @@ send_spa_packet_http(const char *spa_data, const int sd_len,
 
         snprintf(http_buf, HTTP_MAX_REQUEST_LEN,
             "GET http://%s/%s HTTP/1.0\r\nUser-Agent: %s\r\nAccept: */*\r\n"
-            "Host: %s\r\nConnection: Keep-Alive\r\n\r\n",
+            "Host: %s\r\nConnection: close\r\n\r\n",
             options->spa_server_str,
             spa_data_copy,
             options->http_user_agent,