W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > January to April 2000

Idempotent sequences of methods

From: Miles Sabin <msabin@cromwellmedia.co.uk>
Date: Fri, 21 Jan 2000 16:47:15 -0000
Message-ID: <AA4C152BA2F9D211B9DD0008C79F760A67525B@odin.cromwellmedia.co.uk>
To: http-wg@hplb.hpl.hp.com
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 16:48:46 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:33:35 EDT