diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1997-07-26 20:18:43 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1997-07-26 20:18:43 +0000 |
commit | 12b78297398da6ab50823bd4ea9e7afc3ec505fe (patch) | |
tree | 2ad9e8cfa58e241cc6deb158b70f6442540f9179 | |
parent | 1d7adc8bea09c232408e47fa5ff52bc75189386f (diff) | |
download | src-12b78297398da6ab50823bd4ea9e7afc3ec505fe.tar.gz src-12b78297398da6ab50823bd4ea9e7afc3ec505fe.zip |
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?= <aagero@aage.priv.no>
Notes
Notes:
svn path=/head/; revision=27712
-rw-r--r-- | usr.bin/fetch/http.c | 4 |
1 files 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 <sys/types.h> @@ -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) { |