From owner-freebsd-bugs Mon Sep 25 7: 0:15 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 86ADF37B422 for ; Mon, 25 Sep 2000 07:00:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA08804; Mon, 25 Sep 2000 07:00:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 25 Sep 2000 07:00:04 -0700 (PDT) Message-Id: <200009251400.HAA08804@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: bin/21476: ftp in 4.1-STABLE fails on http:// URLs Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/21476; it has been noted by GNATS. From: Ruslan Ermilov To: Dag-Erling Smorgrav Cc: bug-followup@FreeBSD.org Subject: Re: bin/21476: ftp in 4.1-STABLE fails on http:// URLs Date: Mon, 25 Sep 2000 16:58:07 +0300 On Mon, Sep 25, 2000 at 03:14:15PM +0200, Dag-Erling Smorgrav wrote: > Ruslan Ermilov writes: > > The server www.ben-tech.com is violating RFC1945 by requiring that > > the Host: header be present in any HTTP/1.0 request. Compare: > > RFC1945 was never a standard. The closest thing to a standard is > RFC2616, which basically says the Host: header is required in HTTP/1.1 > requests (it's slightly more complicated than that; see sections 5.2, > 9, 14.23 and especially 19.6.1.1). > > Yes, you made an HTTP/1.0 request, but www.ben-tech.com runs Apache > 1.3.12, which is what the RFC calls an "HTTP/1.1 origin server", and > as such (quoting section 3.1), > > SHOULD use an HTTP-Version of > "HTTP/1.1" in their messages, and MUST do so for any message that is > not compatible with HTTP/1.0. For more details on when to send > specific HTTP-Version values, see RFC 2145 [36]. > > (RFC2145 is "Use and interpretation of HTTP version numbers", which > explains what version number to use when communicating with servers or > clients that implement a different HTTP version) > > Furthermore, section 19.6.1.1 ("Changes to Simplify Multi-homed Web > Servers and Conserve IP Addresses") states: > > The requirements that clients and servers support the Host request- > header, report an error if the Host request-header (section 14.23) is > missing from an HTTP/1.1 request, and accept absolute URIs (section > 5.1.2) are among the most important changes defined by this > specification. > > [...] 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. > > - A client that sends an HTTP/1.1 request MUST send a Host header. > > - Servers MUST report a 400 (Bad Request) error if an HTTP/1.1 > request does not include a Host request-header. > > - Servers MUST accept absolute URIs. > > In summary, this says FreeBSD's ftp(1) has been in error since June > 1999, when RFC2616 was published. > [fetch(1) propaganda removed :-)] > > (Oh, and Apache was correct in this instance, but it isn't always. > Amongst other crimes, it will insist on using chunked encoding in > conversations with HTTP/1.0 clients, in violation of RFC2145, and it > will in some instances choke on absolute URIs in requests, in > violation of RFC2616) > Forgive me my ignorance but from where of the above it does follow that the HTTP/1.0 request should include the Host: header and not having it there should be answered with a 404 reply? For example, $ telnet www.apache.org 80 Trying 63.211.145.10... Connected to www.apache.org. Escape character is '^]'. HEAD /index.html HTTP/1.0 HTTP/1.1 200 OK Date: Mon, 25 Sep 2000 13:52:35 GMT Server: Apache/1.3.13-dev (Unix) tomcat/1.0 Connection: close Content-Type: text/html Connection closed by foreign host. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message