From 84e036f95b6b239c95c696b884c3989fc30af338 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Wed, 1 Aug 2012 23:27:34 -0400 Subject: [PATCH] Change HTTP connection type to 'close' in -R mode Applied patch from Jonathan Schulz to change the HTTP connection type to 'close' for the client in -R mode. --- client/http_resolve_host.c | 2 +- client/spa_comm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/http_resolve_host.c b/client/http_resolve_host.c index 9282437d..cac9198d 100644 --- a/client/http_resolve_host.c +++ b/client/http_resolve_host.c @@ -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 diff --git a/client/spa_comm.c b/client/spa_comm.c index 92de1c9d..7d70ceee 100644 --- a/client/spa_comm.c +++ b/client/spa_comm.c @@ -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,