Subject: Interpretation of response body in case of PUT and 200 Ok

From: Jan Algermissen <[email-masked]>
Date: Sun, 06 Dec 2009 15:37:35 +0100

Hi,

section 8.2.1 of RFC 2616 provides information how recipients
of 200 Ok responses should interprete the response body (this
is at least my understanding of the text of 8.2.1).

What is the intended interpretation of the response body in
PUT requests? Should the client understand the body to be
a representation of the request URI of the PUT request? Or
more like "an entity describing or containing the result of
the action" like in the case of POST?

I looked at draft-ietf-httpbis-p2-semantics-08 and the issues list
and both do not seem to address this either.

If you feel it is appropriate, I think 8.2.1 should be augmented
with an explanatory paragraph for PUT.

Jan

---

From: Julian Reschke <[email-masked]>
Date: Sun, 06 Dec 2009 18:05:31 +0100

> is at least my understanding of the text of 8.2.1).

I assume you mean 
<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-08.html#rfc.section.8.2.1>?

> the action" like in the case of POST?

We have made some progress on this issue with draft 08, see 
<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-08.html#rfc.section.6.1>:

"6.1 Identifying the Resource Associated with a Representation

It is sometimes necessary to determine the identity of the resource 
associated with a representation.

An HTTP request representation, when present, is always associated with 
an anonymous (i.e., unidentified) resource.

In the common case, an HTTP response is a representation of the resource 
located at the request-URI. However, this is not always the case. To 
determine the URI of the resource a response is associated with, the 
following rules are used (first match winning):

    1. If the response status code is 200 or 203 and the request method 
was GET, the response is a representation of the resource at the 
request-URI.
    2. If the response status is 204, 206, or 304 and the request method 
was GET or HEAD, the response is a partial representation of the 
resource at the request-URI (see Section 2.7 of [Part6]).
    3. If the response has a Content-Location header, and that URI is 
the same as the request-URI [rfc.comment.1: (see [ref])], the response 
is a representation of the resource at the request-URI.
    4. If the response has a Content-Location header, and that URI is 
not the same as the request-URI, the response asserts that it is a 
representation of the resource at the Content-Location URI (but it may 
not be).
    5. Otherwise, the response is a representation of an anonymous 
(i.e., unidentified) resource."

So the answer for PUT->200 would be that it's undefined, unless it comes 
with a Content-Location header.

> and both do not seem to address this either.

<http://tools.ietf.org/wg/httpbis/trac/ticket/110>

<http://trac.tools.ietf.org/wg/httpbis/trac/ticket/22>

> with an explanatory paragraph for PUT.

All method descriptions do require a rewrite, I think.

Best regards, Julian