Re: Content type

[email protected] Mon, 15 Mar 2004 14:13:05 -0600
Newsgroups gmane.comp.djb.publicfile
Message-ID <[email protected]>
On Sun, Mar 14, 2004 at 12:38:25PM -0500, Zak Johnson wrote:
> On 2004-03-14 08:12-0600, [email protected] wrote:
> > Here is a response from yum's maintainer:
> > 
> >      publicfile isn't sending a content length header with it's url depsite
> >      claiming to be an http 1.0 compliant web server.
> > 
> >      it's broken.
> 
> Sounds as though yum's maintainer is confused:

It turns out, that yum sends an HTTP/1.1 request.  Is it true then
that the following from rfc2616 (section 4.4 Message length)  applies:

      3.If a Content-Length header field (section 14.13) is present,
        its decimal value in OCTETs represents both the entity-length
        and the transfer-length. The Content-Length header field MUST
        NOT be sent if these two lengths are different (i.e., if a
        Transfer-Encoding header field is present). If a message is
        received with both a Transfer-Encoding header field and a
        Content-Length header field, the latter MUST be ignored.

In other words, publicfile is correct when in the following
conversation does not send Content-Length:

$ telnet moni.csi.hu 80
Trying 141.225.11.87...
Connected to moni.csi.hu.
Escape character is '^]'.
GET /index.html HTTP/1.1
host: moni.csi.hu

HTTP/1.1 200 OK
Server: publicfile
Date: Mon, 15 Mar 2004 19:58:55 GMT
Last-Modified: Mon, 15 Mar 2004 14:16:03 GMT
Content-Type: text/html
Transfer-Encoding: chunked

5a
<html>
<body>
<p>
Powered by qmail, djbdns, publicfile on a Lignux system.
</body>
</html>

Mate
-- 
---
Mate Wierdl | Dept. of Math. Sciences | University of Memphis  
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html