From 12b78297398da6ab50823bd4ea9e7afc3ec505fe Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Sat, 26 Jul 1997 20:18:43 +0000 Subject: [PATCH] Work around a brokenness in the HTTP spec by generating the Host header for ftp: URLs as well. This can't possibly be done in the general case, but since we only claim to support http and ftp, we'll adhere to the bogus requirement (RFC 2068, s. 14.25) anyway... >sigh< Submitted by: =?iso-8859-1?Q?=C5ge_R=F8bekk?= --- usr.bin/fetch/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c index de49e16ef66f..6f4211dcd802 100644 --- a/usr.bin/fetch/http.c +++ b/usr.bin/fetch/http.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: http.c,v 1.8 1997/07/26 19:25:56 wollman Exp $ + * $Id: http.c,v 1.9 1997/07/26 20:00:05 wollman Exp $ */ #include @@ -247,7 +247,7 @@ out: return rv; } - if (strncmp(uri, "http://", 7) == 0) { + if (strncmp(uri, "http://", 7) == 0 || strncmp(uri, "ftp://", 6) == 0) { char *hosthdr; slash = strchr(uri + 7, '/'); if (slash == 0) {