Use HTTP/1.1 when communicating over HTTP

The "Connection" and "Host" fields were already always provided anyway.
This commit is contained in:
2018-07-09 14:12:23 +02:00
parent e6b095a430
commit 148d6eba22
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ try_url(struct url *url, fko_cli_options_t *options)
* to contacting whatismyip.org, but using a different URL).
*/
snprintf(http_buf, HTTP_MAX_REQUEST_LEN,
"GET %s HTTP/1.0\r\nUser-Agent: %s\r\nAccept: */*\r\n"
"GET %s HTTP/1.1\r\nUser-Agent: %s\r\nAccept: */*\r\n"
"Host: %s\r\nConnection: close\r\n\r\n",
url->path,
options->http_user_agent,
+1 -1
View File
@@ -546,7 +546,7 @@ send_spa_packet_http(const char *spa_data, const int sd_len,
if(options->http_proxy[0] == 0x0)
{
snprintf(http_buf, HTTP_MAX_REQUEST_LEN,
"GET /%s HTTP/1.0\r\nUser-Agent: %s\r\nAccept: */*\r\n"
"GET /%s HTTP/1.1\r\nUser-Agent: %s\r\nAccept: */*\r\n"
"Host: %s\r\nConnection: close\r\n\r\n",
spa_data_copy,
options->http_user_agent,