<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>848</bug_id>
          
          <creation_ts>2004-08-25 12:50:11 +0000</creation_ts>
          <short_desc>Content Negotiation (or MIME Types)</short_desc>
          <delta_ts>2007-10-02 06:20:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>0.6.7</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.st-minutiae.com/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>0.8.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dan Carlson">minutiaeman</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          <cc>minutiaeman</cc>
    
    <cc>sierkb</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2167</commentid>
    <comment_count>0</comment_count>
    <who name="Dan Carlson">minutiaeman</who>
    <bug_when>2004-08-25 12:50:11 +0000</bug_when>
    <thetext>Because a large number of user agents are unable to properly handle the &quot;application/xhtml+xml&quot; 
MIME type with which XHTML pages *should* be served, I have configured my server to serve my 
website&apos;s XHTML 1.1 pages as &quot;text/html&quot; by default, and, if the user agent identifies itself as 
capable of understanding the format (via the HTTP_ACCEPT header), it will change the MIME type 
and serve it as &quot;application/xhtml+xml&quot; instead.

I use the method described at the end of this article (via .htaccess scripts):
http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html

However, I have noticed that the W3C Validator does not provide any sort of content negotiation via 
the HTTP_ACCEPT header.  This is a relatively trivial issue, but perhaps it would be a good idea to 
configure the validator to announce what types of files it will accept, so that servers will serve it 
XHTML files using the proper MIME type when possible?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16473</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Nicholls">streaky</who>
    <bug_when>2007-09-11 20:21:33 +0000</bug_when>
    <thetext>This bug is invalid, quoting from the Bible (RFC 2616 - 14.1):

&quot;If no Accept header field is present, then it is assumed that the client accepts all media types. 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.&quot;

So sending no header is fine, it&apos;s the same as */*, thus it accepts everything, and f you want that to mean application/xhtml+xml then so be it.

I realise the bug is hugely old but it&apos;s not marked as resolved so I thought I should point this out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16474</commentid>
    <comment_count>2</comment_count>
    <who name="Sierk Bornemann">sierkb</who>
    <bug_when>2007-09-11 20:46:34 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; This bug is invalid, quoting from the Bible (RFC 2616 - 14.1):
&gt; 
&gt; &quot;If no Accept header field is present, then it is assumed that the client
&gt; accepts all media types. If an Accept header field is present, and if the
&gt; server cannot send a response which is acceptable according to the combined
&gt; Accept field value, then the server SHOULD send a 406 (not acceptable)
&gt; response.&quot;
&gt; 
&gt; So sending no header is fine, it&apos;s the same as */*, thus it accepts everything,
&gt; and f you want that to mean application/xhtml+xml then so be it.
&gt; 
&gt; I realise the bug is hugely old but it&apos;s not marked as resolved so I thought I
&gt; should point this out.
&gt; 

Please read carefully Bug #18 and Bug #785 and their comments and the appropriate discussion on www-validator.w3.org. Maybe then you will acknowledge, that it absolutely makes sense to either send a *reasonable* HTTP_ACCEPT header field or tunnel transparently the client&apos;s accept header information rather than just offering an empty or */* HTTP_ACCEPT header field.
Because discussion isn&apos;t finally closed on this issue and the patch proposed on Bug #18 hasn&apos;t found its way into the CVS trunk, from my point of view it makes sense to let Bug #848, Bug #18 and Bug #785 still be open.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16960</commentid>
    <comment_count>3</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-10-02 06:20:27 +0000</bug_when>
    <thetext>Negotiation (format or language) can now be forced via the accept and accept-language parameters. See Bug 18 for details.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>