RE: empty resources

On Tuesday, March 10, 1998 3:50 PM, Jim Davis [SMTP:jdavis@parc.xerox.com] 
wrote:
> Could someone set me straight on whether WebDAV makes any committment 
about
> whether I can do a PROPPATCH on a URI for an empty resource?  I mean, of
> course, without an error.

We don't explicitly permit this operation in the -07 spec. because if you 
create properties on a null resource, that resource becomes non-null, and 
then has a body as well.  This creates an awkward situation where there is 
a non-null resource without a content type.  To set properties on a null 
resource, first do a PUT with a Content-Type header and a zero length body, 
creating a resource with a known content type, and an empty body. Then, 
perform a PROPPATCH on this empty resource.

> Is the proper term 'empty' resource or 'null' resource, by the way?  And
> where is it defined?  In RFC 2068?

We've been trying to distinguish between an empty resource (zero length), 
and a null resource (what happens after a delete).  This is not defined 
primarily to avoid stepping into the pit called "defining the HTTP object 
model". I don't believe RFC 2068 defines "null" resource.

One awkward question that would need to be addressed to define "null 
resource" is this: since methods are invoked on resources, what entity 
generates a 404 (Not Found) message for a particular URI when that URI 
identifies a non-existent (or null) resource?  Also, what entity returns a 
200 (OK) after a successful DELETE?

These are interesting questions, however, I don't think the DA spec. is 
well-served by trying to answer them, since these answers do not generate 
extra interoperability. However, I do think that someone should address 
these concerns, but in a different forum than an interoperability 
specification.  Perhaps Roy Fielding will in his Ph.D. dissertation.

- Jim

Received on Tuesday, 10 March 1998 21:42:01 UTC