Bug 15000

Summary: ftp(1) needs to send HTTP/1.1 Host: header
Product: Base System Reporter: mike
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.2-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description mike 1999-11-19 22:50:00 UTC
Section 19.6.1.1 of RFC 2616 (HTTP/1.1) says:

   Given the rate of growth of
   the Web, and the number of servers already deployed, it is extremely
   important that all implementations of HTTP (including updates to
   existing HTTP/1.0 applications) correctly implement these
   requirements:

      - Both clients and servers MUST support the Host request-header.

Fix: I also submitted this patch to the NetBSD GNATS database.
How-To-Repeat: This fails because the HTTP server needs to be told that the desired virtual host is xml.apache.org, not 209.133.83.18:

ftp http://xml.apache.org/dist/LICENSE.txt
Comment 1 mike 1999-11-19 23:54:32 UTC
I got a fast response from Luke Mewburn, the FTP guy for NetBSD. 
Their ftp(1) is 80 patchlevels ahead of FreeBSD's and has many more 
improvements than just the Host: header. He says:

"I would recommend that FreeBSD imports and tracks
ftp://ftp.netbsd.org/pub/NetBSD/misc/lukemftp/lukemftp-1.1.tar.gz
because that is a `self contained' product with various fixes to stuff 
like libedit and extra libc functions which FreeBSD may not have yet."

You can also look at 
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/basesrc/usr.bin/ftp/fetch.c
to see how far ahead they are with just ftp/fetch.c.
Comment 2 mike 1999-11-26 18:14:22 UTC
We just moved xml.apache.org, so the example I posted doesn't fail
anymore. But you get the idea.
Comment 3 dirk freebsd_committer freebsd_triage 2000-11-09 12:30:56 UTC
Responsible Changed
From-To: freebsd-bugs->des

Over to Mr. fetch.
Comment 4 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2000-11-09 12:41:36 UTC
Responsible Changed
From-To: des->freebsd-bugs

ftp(1) is not fetch(1), and does not use fetch(3).
Comment 5 Chris D.Faulhaber freebsd_committer freebsd_triage 2001-11-16 23:28:51 UTC
State Changed
From-To: open->closed

o submitter recommends lukemftp for better http support using 
an ftp client (though fetch(1) should also work fine).
Comment 6 des 2001-11-17 20:00:24 UTC
<jedgar@FreeBSD.org> writes:
> o submitter recommends lukemftp for better http support using
>   an ftp client (though fetch(1) should also work fine).

Fetch(1) does indeed work fine, and always has - for a suitable
definition of "always" :-)  As for lukemftp, there is a good chance we
will switch to it at some point in the not-to-far future.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org