Subject: OPTIONS

From: "Kevin Wiggen" <[email-masked]>
Date: Tue, 13 Feb 2001 14:36:10 -0800

Another from the line of "null resource" vrs "lock null resource" vrs a
"resource".

While implementing OPTIONS and PUT (with LOCKS) a few things need to be
specified in 2518.

The problem is handling requests to resources that don't exist.  The
following are some use-cases:

1)  /foo is a directory with no contents.
    OPTIONS to /foo returns a 200 with the appropriate headers
    OPTIONS to /foo/bar returns??  200 or 404??
    OPTIONS to /foo/bar/fee returns a 404

2)  /foo is a directory with no contents and is locked depth infinity
    PUT to /foo/bar, does this require a tagged list for the lock token
specifying /foo or will un untagged list work as well.

Yes I have raised number 2 before.  I think the key here is whether or not a
"null resource" is considered an entity on the server or not.  Since OPTIONS
in 2068 states "the OPTIONS request applies only to the options that are
available when communicating with that resource."  Thus to get a 200
response a resource must exist!!!

Is the intent of 2518 to create "lock null resources" AND "null resources"
where the "null resource" is defined as a resource that does not exist but
the parent does????  Thus OPTIONS and LOCKS work differently than if a "null
resource" is not a real resource and thus simply returns 404 to Webdav
requests.

Thoughts??

Kevin

---

From: John Stracke <[email-masked]>
Date: Wed, 14 Feb 2001 11:00:25 -0500

>     OPTIONS to /foo/bar/fee returns a 404

[...]

> Since OPTIONS
> in 2068

(Side note: you want 2616, which obsoletes 2068.)

> states "the OPTIONS request applies only to the options that are

Well, let's see.  Consider PUT, for example; obviously, you can PUT to a
resource which does not exist (in the sense that GET would return 404).
Therefore, it is useful for OPTIONS to be able to tell you that PUT is allowed
on that resource.

<tries stuff>...OK, let's see.  Running against Apache, if I do OPTIONS against
a non-existent resource (in a non-existent directory), I get a 200, with the
expected data.  GET against the same resource returns 404; SMURF against that
resource returns 405.

To me, this seems reasonable.  I believe that *all* resources exist.  A
resource is an object whose methods are HTTP methods; you can issue an HTTP
method against any Request-URI in the server's namespace; the server will
respond.  By definition, the response is the result of that object's method.
Therefore, there is an object named by that Request-URI.  Note that 2616,
section 10.4.5, defines 404 as meaning, "The server has not found anything
matching the Request-URI".  This is *not* the same as saying that the specified
resource does not exist.

--
/==============================================================\
|John Stracke    | http://www.ecal.com |My opinions are my own.|
|Chief Scientist |=============================================|
|eCal Corp.      |"Call me a Nervous Nellie, but I am concerned|
[email-masked]|about the sale of nuclear arms in my general |
|                |neighborhood." -- Dave Barry                 |
\==============================================================/