Use HTTP/1.1 when communicating over HTTP
The "Connection" and "Host" fields were already always provided anyway.
This commit is contained in:
@@ -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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user