W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > October to December 2003

Re: Status Code/Entity body encoded in XML

From: Julian Reschke <julian.reschke@gmx.de>
Date: Tue, 04 Nov 2003 19:44:26 +0100
Message-ID: <3FA7F38A.9090205@gmx.de>
To: Stanley Guan <stanley.guan@oracle.com>
Cc: w3c-dist-auth@w3.org

Stanley Guan wrote:

> Hi,
> What's the rule of thumb to find out there is an XML payload
> in the entity body?  In the following examples,
>     1. Status code alone doesn't provide the clue
>         However, the spec. says that:
>            "Based on returned status code, the client can
>             always take a resonable course of action."
>     2. Content-Type seems to be the clue.
> What's the guideline for the server to return an XML payload
> in the entity body?  Say, for the PROPFIND, can it returns
> 200 (instead of 207) as status code and returns the property
> value like:
>    <?xml version="1.0" encoding="utf-8" ?>
>    <D:prop xmlns:D="DAV:">
>    ...
>    </D:prop>
> Will appreciate your clarification!

1) PROPFIND never returns a 200 code.

2) If a method returns 207, the content type MUST be */xml, and the 
response must have a DAV:multistatus root element.

3) Servers *may* return a */xml response for 4xx and 5xx status codes, 
in which case a client can test for a DAV:error root element or a 
DAV:multistatus element to extract more information.


<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
Received on Tuesday, 4 November 2003 13:49:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:28 UTC