summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1997-07-26 20:18:43 +0000
committerwollman <wollman@FreeBSD.org>1997-07-26 20:18:43 +0000
commit4f60b2e680df99d89501268db74f067df002d062 (patch)
tree3825313dae619ed008d4a54deffc6edd5bdc70aa /usr.bin/fetch
parent7ddb9c4a548f76c6f53cbbe6b90a6e1ef3ba5c5a (diff)
downloadFreeBSD-src-4f60b2e680df99d89501268db74f067df002d062.zip
FreeBSD-src-4f60b2e680df99d89501268db74f067df002d062.tar.gz
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>
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c
index de49e16..6f4211d 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) {
OpenPOWER on IntegriCloud