From 95bfcf8542c3ad42947339cffa3427edf5e9336f Mon Sep 17 00:00:00 2001 From: Evgeny Sinelnikov Date: Sat, 21 Nov 2009 17:57:06 +0300 Subject: [PATCH] replace HTTP request version to 1.1 --- url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/url.c b/url.c index 3b1328d..914041f 100644 --- a/url.c +++ b/url.c @@ -424,8 +424,8 @@ int http_download_file(char * hostname, char * remotename, int * size) return FTPERR_FAILED_CONNECT; } - buf = alloca(strlen(remotename) + 20); - sprintf(buf, "GET %s HTTP/1.0\r\n\r\n", remotename); + buf = alloca(strlen(remotename) + strlen(hostname) + 20); + sprintf(buf, "GET %s HTTP/1.1\r\nHost: %s\r\n\r\n", remotename, hostname); rc = write(sock, buf, strlen(buf)); /* This is fun; read the response a character at a time until we: