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

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 UTC