Idempotent sequences of methods

The discussion in the 'On piplining' thread reminded me of
something I found puzzling in 9.1.

I have a strong suspicion that although 9.1.2 suggests that
an idempotent sequence of methods might contain non-safe
idempotent methods (PUT, DELETE), this can't actually be the
case.

Here's the argument,

* A sequence which contains a PUT/DELETE <uri1> after a 
  GET/HEAD/TRACE/OPTIONS <uri2> is idempotent only if
  uri1 is independent of uri2.

* There is nothing in the definition of an HTTP URI which
  allows us to infer that two URIs are independent.

Suppose, for the sake of argument, that a URI path maps
in a natural way onto part of the servers filesystem tree.
In this case, it's clear that we can't infer that,

  http://www.foo.com/a/b/c

is independent of,

  http://www.foo.com/a

on a purely textual basis because if we were to DELETE the 
latter we would have also deleted the former.

Again, with the filesystem mapping assumption, we can't even
assume that,

  http://www.foo.com/a/b/c

is independent of,

  http://www.foo.com/d/e/f

because they might both reference the same underlying file
in the servers filesystem (eg. via a symlink, or via an
HTTP server path mapping).

So, we can't use textual difference of URIs to infer 
independence. Given that we haven't anything else to go on at 
the user-agent end I conclude that an idempotent sequence of
methods can't contain any non-safe methods.

QED ;-)

Comments?

Cheers,


Miles

-- 
Miles Sabin                       Cromwell Media
Internet Systems Architect        5/6 Glenthorne Mews
+44 (0)20 8817 4030               London, W6 0LJ, England
msabin@cromwellmedia.com          http://www.cromwellmedia.com/

Received on Friday, 21 January 2000 08:49:09 UTC