W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > January to March 1999

Re: Protocol Design: new XML elements in the body or new headers?

From: Roy T. Fielding <fielding@kiwi.ics.uci.edu>
Date: Mon, 18 Jan 1999 06:04:20 -0800
To: "Geoffrey M. Clemm" <gclemm@atria.com>
cc: w3c-dist-auth@w3.org
Message-ID: <9901180604.aa14287@paris.ics.uci.edu>
>Many of the new methods being defined for WebDAV versioning have
>an XML document as the value of their request and/or response body.
>While designing the protocol, I am continually faced with the question:
>
>Should an input parameter to the method be represented as a new XML
>element in the request body or as a new request header?  Similarly,
>should an output parameter to the method be represented as a new XML
>element in the response body or as a new respose header?

The body of an HTTP request/response is payload.  If it contains anything
significant to the semantics of the operation or result, aside from a
representation of data as defined by those semantics, then it isn't HTTP.
It is something else tunneling inside HTTP, which is a waste of bytes.

In general, if you find yourself with many new methods and request
header fields, then it means there is something fundamentally wrong
with the protocol design.  Usually the fix is to do the same thing
with far fewer extensions simply by using a redirect to a different
resource rather than using new methods/fields to act indirectly.

This is from experience -- I haven't looked at the WebDAV versioning
stuff at all.

....Roy
Received on Monday, 18 January 1999 09:06:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:49 GMT