W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > January to March 1998

getcontentlength property and dynamically-generated content

From: Wesley Felter <wesley@scripting.com>
Date: Wed, 25 Mar 1998 00:58:11 -0600
Message-Id: <199803250703.BAA08362@mail.utexas.edu>
To: <w3c-dist-auth@w3.org>
I have an interesting situation and I'm hoping someone can offer a little advice.

I'm writing a WEBDAV server that serves out of an object database (which is just a hierarchial tree of objects). Objects can't be transmitted directly from the database; they have to be serialized so that they can be transferred over HTTP. When serving a GET request, the object is serialized and then finding its Content-Length is easy.

However, when serving a HEAD or PROPFIND request, there is no way to find the length without serializing the object (which can be a time-consuming process if the object is large). It seems like a waste of effort to serialize an object only to find its length.

As I understand the spec, my server should either send a Content-Length header for GET and HEAD methods and the getcontentlength property for PROPFINDs, or not at all. This is more strict than I would like.

Is there a way around this that I don't see? Should I just pay the penalty, or should the spec be modified to support only sending the content length when it is not wasteful to compute it?

Wesley Felter - wesley@scripting.com
Received on Wednesday, 25 March 1998 02:03:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:44 GMT