Subject: 3.2.2 issue

From: "Mark Baker" <[email-masked]>
Date: Sun, 21 Jan 2007 20:35:55 -0500

This was posted to rest-discuss earlier this month, and suggests an
issue with 3.2.2.

---------- Forwarded message ----------
From: Roy T. Fielding <[email-masked]>
Date: Jan 3, 2007 7:52 PM
Subject: Re: [rest-discuss] Re: Request for feedback: REST for the Rest of Us
To: "Steve G. Bjorg" <[email-masked]>
Cc: [email-masked]

On Jan 3, 2007, at 4:22 PM, Steve G. Bjorg wrote:
> Bill de hOra wrote:
> > Bill, the same resource is the accessed in both cases as the
> resource
> > identifier is the same - namely the pieces up to the query string
> (see
> > para two in 3.2.2 of the HTTP spec).
>
> Wonderful! All is good then.

That was the case back in 1994, when I wrote it.  It has not been true
for a long time since.  It is one of those things that became untrue
once people realized that the interface had no reason to respect such
a distinction (and rightly so -- it introduces coupling where none is
needed) and so the distinction was removed server-side to reflect the
migration of resources to new implementations.

The resource in HTTP is the mapping from the entire identifier
(including scheme, authority, path, and query) to a set of values.
For two resources to be the same, they must map to the same set
of values for all time.  There is no way to determine that by
inspecting the identifiers, aside from scheme-defined equivalence.

....Roy

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rest-discuss/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/rest-discuss/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email-masked]
    mailto:[email-masked]

<*> To unsubscribe from this group, send an email to:
    [email-masked]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

-- 
Mark Baker.  Ottawa, Ontario, CANADA.         http://www.markbaker.ca
Coactus; Web-inspired integration strategies  http://www.coactus.com

---

From: Henrik Nordstrom <[email-masked]>
Date: Mon, 22 Jan 2007 08:21:47 +0100

> This was posted to rest-discuss earlier this month, and suggests an

I don't quite get the issue. It says that the resource on the server
that acts on the request is identified by the abs_path, but so what? It
also defines that there may be a query to that resource as part of the
URL. The meaning of the query is defined in RFC2396 which also has the
same definition of resource.

But the sentence is quite irrelevant as the specs do not really define
how servers implement or define the resources, and the resource which
acts on the request is also quite irrelevant to the specs..

Regards
Henrik

---

From: "Mark Baker" <[email-masked]>
Date: Mon, 22 Jan 2007 13:54:04 -0500

On 1/22/07, Henrik Nordstrom <[email-masked]> wrote:
> that acts on the request is identified by the abs_path, but so what?

It's wrong.  The resource is identified by the whole URI (or abs_path
+ query in this context).

> It

Agreed, but I think we should fix the error mentioned above either by
removing all mention of the identified resource, or by saying it's
identified by abs_path + query.  I suppose I'd prefer the former (for
the reasoning you give), but the latter is a less disruptive fix.
*shrug*

Mark.

---

From: Julian Reschke <[email-masked]>
Date: Tue, 23 Jan 2007 12:44:36 +0100

> the reasoning you give), but the latter is a less disruptive fix.

I agree that this needs to be fixed (re-open issue 11, MNot?).

3.2.2 really doesn't say what identifies the resource:

"If the port is empty or not given, port 80 is assumed. The semantics 
are that the identified resource is located at the server listening for 
TCP connections on that port of that host, and the Request-URI for the 
resource is abs_path (Section 5.1.2)."

But it *does* say what part of the HTTP URL becomes the Request-URI, and 
that definitively needs to be fixed.

Here's a proposed replacement text:

"The semantics are that the identified resource is located at the server 
listening for TCP connections on that port of that host, and the 
Request-URI for the resource is abs_path plus the optional query 
parameter (Section 5.1.2)."

Best regards, Julian

---

From: Henrik Nordstrom <[email-masked]>
Date: Wed, 24 Jan 2007 01:43:59 +0100

> parameter (Section 5.1.2)."

Hmm.. this issue is seen at a more places in the text (3.1.1, 5.1.2).
Just search for abs_path.

May be better to  define an abs_path_query term, and use this everywhere
in the text except for the default / in 5.1.2.. Changing all text
references to abs_path [ "?" query ] feels redundant and risks making
the text less readable.

Regards
Henrik

---

From: Julian Reschke <[email-masked]>
Date: Wed, 24 Jan 2007 01:48:31 +0100

> references to abs_path [ "?" query ] feels redundant and risks making

I was thinking that after I wrote my mail, I'll give it a try, and post 
the diffs that result.

Best regards, Julian

---

From: "Roy T. Fielding" <[email-masked]>
Date: Tue, 23 Jan 2007 17:50:20 -0800

On Jan 23, 2007, at 3:44 AM, Julian Reschke wrote:
> "The semantics are that the identified resource is located at the  
> server listening for TCP connections on that port of that host, and  
> the Request-URI for the resource is abs_path plus the optional  
> query parameter (Section 5.1.2)."

I would replace it with two sentences that explain how the URI
is used in HTTP messages, first for proxies and then for origin servers.
It really isn't necessary to talk about semantics, identifying, or
even the resource in this context.

....Roy

---

From: Henrik Nordstrom <[email-masked]>
Date: Wed, 24 Jan 2007 03:47:48 +0100

> even the resource in this context.

That is discussed in detail in 5.1.2. Perhaps even a bit too detail..

Regards
Henrik

---

From: Julian Reschke <[email-masked]>
Date: Wed, 24 Jan 2007 10:04:31 +0100

> That is discussed in detail in 5.1.2. Perhaps even a bit too detail..

Which reminds me that 5.1.2 starts saying...:

"The Request-URI is a Uniform Resource Identifier (Section 3.2) and 
identifies the resource upon which to apply the request."

It's not really a URI. We need to clean this up either in context of 
this issue, or when doing the RFC2396->3986 transition.

Best regards, Julian

---

From: "Roy T. Fielding" <[email-masked]>
Date: Wed, 24 Jan 2007 13:42:48 -0800

On Jan 24, 2007, at 1:04 AM, Julian Reschke wrote:
> It's not really a URI. We need to clean this up either in context  
> of this issue, or when doing the RFC2396->3986 transition.

It should be Request-Target (or something like that).  I've been using
that phrase for a while.

....Roy

---

From: Julian Reschke <[email-masked]>
Date: Wed, 24 Jan 2007 22:54:06 +0100

> It should be Request-Target (or something like that).  I've been using

I was a bit nervous about renaming the grammar production, because of 
its widespread use in other documents, but it's probably better renamed 
in order to avoid future confusion...

Best regards, Julian