diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 1998-03-26 03:17:09 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 1998-03-26 03:17:09 +0000 |
commit | 938d5ea5d99e8231fb1a4482a142004288cb3ee8 (patch) | |
tree | bf08979b954b7399705bec68293e65a1e0234a01 /usr.bin/ftp | |
parent | 5c757cc40cdfde3d53670c8c8db0277b5dd40d1e (diff) |
pass host name with GET request so servers hosting multiple virtual
hosts know to which host the given path applies
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r-- | usr.bin/ftp/fetch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index ea12fe841c0..24dcd1e272d 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.17 1998/02/17 23:22:54 millert Exp $ */ +/* $OpenBSD: fetch.c,v 1.18 1998/03/26 03:17:08 marc Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fetch.c,v 1.17 1998/02/17 23:22:54 millert Exp $"; +static char rcsid[] = "$OpenBSD: fetch.c,v 1.18 1998/03/26 03:17:08 marc Exp $"; #endif /* not lint */ /* @@ -238,8 +238,8 @@ url_get(origline, proxyenv, outfile) fprintf(ttyout, "Requesting %s\n", origline); else fprintf(ttyout, "Requesting %s (via %s)\n", origline, proxyenv); - snprintf(buf, sizeof(buf), "GET %s%s HTTP/1.0\r\n\r\n", - proxy ? "" : "/", path); + snprintf(buf, sizeof(buf), "GET %s%s HTTP/1.0\r\nHost: %s\r\n\r\n", + proxy ? "" : "/", path, host); len = strlen(buf); if (write(s, buf, len) < len) { warn("Writing HTTP request"); |