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

http://lists.w3.org/Archives/Public/w3c-dist-auth/1998JulSep/0113.html

> -----Original Message-----
> From: gclemm@atria.com [mailto:gclemm@atria.com]
> Sent: Saturday, January 16, 1999 8:56 AM
> To: w3c-dist-auth@w3.org
> Subject: Protocol Design: new XML elements in the body or new headers?
> 
> 
> 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?
> 
> In each case, there is backward compatibility, since downlevel clients
> would just not generate the header/element, and downlevel servers
> would just ignore the unknown header/element.
> 
> An argument for the XML element is that the contents of the 
> XML element
> can hold a much wider range of data, and can have its 
> structure defined,
> at least in a coarse syntactic fashion, with a DTD.
> 
> Another argument for the XML element is that you don't have to worry
> about proxies stripping off headers they don't recognize.
> 
> The only argument I can think of for using a header is that it is
> the only technique applicable when the body is being used for some
> other purpose (such as GET/PUT).
> 
> One possible rule of thumb:
> 
> If the request/response body is an XML document, then the 
> request/response
> parameters should be specified as XML elements.  Only if the 
> body is not an
> XML document should parameters be specified as headers.
> 
> Comments?
> 
> Cheers,
> Geoff
> 
> ---
> Geoffrey M. Clemm
> Chief Engineer, Configuration Management Business Unit
> Rational Software Corporation
> (781) 676-2684   geoffrey.clemm@rational.com   http://www.rational.com
> 

Received on Sunday, 17 January 1999 01:44:06 UTC