W3C home > Mailing lists > Public > www-html-editor@w3.org > January to March 2006

Re: [XHTML 2] 17 Embedding Attributes - srcType (PR#7735)

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Wed, 25 Jan 2006 20:15:07 +0100
Message-ID: <43D7CE3B.3020000@cwi.nl>
To: Jim Ley <jim@jibbering.com>
Cc: Steven Pemberton <xhtml2-issues@hades.mn.aptest.com>, www-html-editor@w3.org

Jim Ley wrote:
> "Steven Pemberton" <xhtml2-issues@hades.mn.aptest.com>
>>> Does it mean that only the content-types listed should be rendered
>>> regardless of what content-types the server actually returns. e.g. if 
>>> you
>>> say <p src="item" srcType="text/plain"> and an application/xhtml+xml
>>> resource is returned, the src should be considered a failure and not
>>> rendered.
>>
>> No. In this case you will never get a xhtml+xml returned; you would 
>> get a 406 if
>> there were no such resource.
> 
> HTTP 1.1 does not require that a 406 is returned if no acceptable 
> documents are available
> see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7

Yes, you are right, it says:

  If an Accept header field is present, and if the server cannot send a 
   response which is acceptable according to the combined Accept field 
value, then the server SHOULD send a 406 (not acceptable) response.

But then it doesn't document what cases would be acceptable to ignore 
the user agent's requirements.

The definition of 406 points out

       Note: HTTP/1.1 servers are allowed to return responses which are
       not acceptable according to the accept headers sent in the
       request. In some cases, this may even be preferable to sending a
       406 response. User agents are encouraged to inspect the headers of
       an incoming response to determine if it is acceptable.

Seems like a bug to me, but there you are. We will add text to cover 
that last sentence, to make sure it is acceptable.

>> It does mean (almost) that, and a server returning another content 
>> type would be
>> in error (unless it was a part of a 406).
> 
> So this does not address my concern, and your resolution appears to 
> violate HTTP 1.1.  Please do not violate HTTP 1.1

It doesn't violate HTTP 1.1, it just doesn't take that SHOULD into account.

Thanks for spotting this.

Steven Pemberton
Received on Wednesday, 25 January 2006 19:15:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:55 GMT