replace HTTP request version to 1.1

This commit is contained in:
Evgeny Sinelnikov 2009-11-21 17:57:06 +03:00 committed by Evgeny Sinelnikov
parent 8c1beeb584
commit 95bfcf8542

4
url.c
View File

@ -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: