replace HTTP request version to 1.1
This commit is contained in:
parent
8c1beeb584
commit
95bfcf8542
4
url.c
4
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:
|
||||
|
Loading…
Reference in New Issue
Block a user