<?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>18396</bug_id>
          
          <creation_ts>2012-07-25 12:31:00 +0000</creation_ts>
          <short_desc>Encoding Sniffing Algorithm: Add an XML check as a step zero</short_desc>
          <delta_ts>2016-04-20 22:39:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://dev.w3.org/html5/spec/Overview#encoding-sniffing-algorithm</bug_file_loc>
          <status_whiteboard>whatwg-resolved</status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leif Halvard Silli">xn--mlform-iua</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>d</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>travil</cc>
    
    <cc>w3bugs</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71443</commentid>
    <comment_count>0</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2012-07-25 12:31:00 +0000</bug_when>
    <thetext>Proposal: Extend the encoding sniffing algorithm by adding a new,
          explicit step zero, like so:

     0. If the document is an XML document, abort these steps.

Justification.

    By extending the algorithm this way, then there is an *explicit* 
step to &apos;jump out of the algorithm if XML&apos; - for which it would also be 
possible write test cases.

    Currently, and especially if the XML document lives in a &apos;nested 
browsing context&apos;[1], then (unless there is a BOM) some browsers let 
the XML doc default to the encoding of the &apos;parent browsing context&apos; 
instead of letting it default to the default encoding of the XML format 
(UTF-8). Webkit/Chromium/Opera have this error. Firefox do not have 
this error. I did not test IE9/10 yet, but suspect they are more on 
Firefox&apos; side. Regarding defaulting to the encoding of the parent 
browsing context, then [see bug #foo and see bug #bar]

More data in my related blog post.[2]

[1] http://dev.w3.org/html5/spec/Overview#nested-browsing-context
[2] http://målform.no/blog/white-spots-in-html5-s-encoding-sniffing-algorithm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121041</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-06-16 10:17:52 +0000</bug_when>
    <thetext>Making this a higher priority to actively seek more feedback on from implementers and webdevs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124827</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Rebert">w3bugs</who>
    <bug_when>2016-02-04 07:42:34 +0000</bug_when>
    <thetext>It seems like the current spec addresses this sufficiently.

Quoting from https://mimesniff.spec.whatwg.org/#determining-the-computed-mime-type-of-a-resource :
&gt; 4. If the supplied MIME type is an XML type, the computed MIME type is the supplied MIME type. Abort these steps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125980</commentid>
    <comment_count>3</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2016-04-20 22:39:06 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: Fixed!

Confirmed that W3C HTML links to [MIMESNIFF] which does indeed bailout fast for XML.

If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>