W3C home > Mailing lists > Public > xmlp-comments@w3.org > May 2003

Incorrect Example 8a in section 4.1.1

From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
Date: Thu, 8 May 2003 07:53:45 -0400
Message-Id: <p04330102badff4850834@[]>
To: xmlp-comments@w3.org
Cc: xml-dist-app@w3.org

Example 8a in section 4.1.1 of the Primer is incorrectly described. 
The example is

GET /travelcompany.example.org/reservations?code=FT35ZBQ  HTTP/1.1
Host: travelcompany.example.org
Accept: text/html, application/soap+xml

The explanatory text is "The HTTP Accept header is used to indicate 
the preferred representation of the resource being requested, which 
in this example is an "application/soap+xml" media type for 
consumption by a machine client, rather than the "text/html" media 
type for rendition by a browser client for consumption by a human."

However, there is nothing in Example 8a that indicates that 
application/soap+xml is preferable to text/html. The client indicates 
that it is willing to accept either one with equal priority (the 
default q=1). In order to indicate that application/soap+xml is 
preferred the example shoudl either remove text/html from the Accept 
header completely or adjust the relative q values of the MIME types 
accepted. For example,

GET /travelcompany.example.org/reservations?code=FT35ZBQ  HTTP/1.1
Host: travelcompany.example.org
Accept: text/html; q=0.5, application/soap+xml

   Elliotte Rusty Harold
   Processing XML with Java (Addison-Wesley, 2002)
Received on Thursday, 8 May 2003 07:54:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:16:59 UTC