Skip to content

Commit

Permalink
[e] (0) Try to sync more closely with MIMESNIFF.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19798
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@7769 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 25, 2013
1 parent f6ef2f3 commit 456b840
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
16 changes: 9 additions & 7 deletions complete.html
Expand Up @@ -6945,23 +6945,24 @@ <h4 id=encrypted-http-and-related-security-concerns><span class=secno>2.6.3 </sp


<h4 id=content-type-sniffing><span class=secno>2.6.4 </span>Determining the type of a resource</h4>
<!--CLEANUP-->

<p>The <dfn id=content-type title=Content-Type>Content-Type metadata</dfn> of a resource must be obtained and
interpreted in a manner consistent with the requirements of the Media Type Sniffing specification.
interpreted in a manner consistent with the requirements of the MIME Sniffing specification.
<a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>

<p>The <dfn id=content-type-sniffing-0 title="Content-Type sniffing">sniffed type of a resource</dfn> must be found in a
manner consistent with the requirements given in the Media Type Sniffing specification for finding
the <i>sniffed-type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
manner consistent with the requirements given in the MIME Sniffing specification for finding
the <i>sniffed media type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>

<p>The <dfn id=content-type-sniffing:-image title="Content-Type sniffing: image">rules for sniffing images specifically</dfn> and
the <dfn id=content-type-sniffing:-text-or-binary title="Content-Type sniffing: text or binary">rules for distinguishing if a resource is
text or binary</dfn> are also defined in the Media Type Sniffing specification. Both sets of rules
text or binary</dfn> are also defined in the MIME Sniffing specification. Both sets of rules
return a <a href=#mime-type>MIME type</a> as their result. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>

<p class=warning>It is imperative that the rules in the Media Type Sniffing specification be
<p class=warning>It is imperative that the rules in the MIME Sniffing specification be
followed exactly. When a user agent uses different heuristics for content type detection than the
server expects, security problems can occur. For more details, see the Media Type Sniffing
server expects, security problems can occur. For more details, see the MIME Sniffing
specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>


Expand Down Expand Up @@ -96949,6 +96950,7 @@ <h2 id=iana><span class=secno>16 </span>IANA considerations</h2>

<!-- http://www.w3.org/2002/06/registering-mediatype.html -->

<!--CLEANUP-->

<h3 id=text/html><span class=secno>16.1 </span><dfn><code>text/html</code></dfn></h3>

Expand Down Expand Up @@ -97055,7 +97057,7 @@ <h3 id=text/html><span class=secno>16.1 </span><dfn><code>text/html</code></dfn>
<dl><dt>Magic number(s):</dt>
<dd>No sequence of bytes can uniquely identify an HTML
document. More information on detecting HTML documents is
available in the Media Type Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></dd>
available in the MIME Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></dd>
<dt>File extension(s):</dt>
<dd>"<code title="">html</code>" and "<code title="">htm</code>"
are commonly, but certainly not exclusively, used as the
Expand Down
16 changes: 9 additions & 7 deletions index
Expand Up @@ -6945,23 +6945,24 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d


<h4 id=content-type-sniffing><span class=secno>2.6.4 </span>Determining the type of a resource</h4>
<!--CLEANUP-->

<p>The <dfn id=content-type title=Content-Type>Content-Type metadata</dfn> of a resource must be obtained and
interpreted in a manner consistent with the requirements of the Media Type Sniffing specification.
interpreted in a manner consistent with the requirements of the MIME Sniffing specification.
<a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>

<p>The <dfn id=content-type-sniffing-0 title="Content-Type sniffing">sniffed type of a resource</dfn> must be found in a
manner consistent with the requirements given in the Media Type Sniffing specification for finding
the <i>sniffed-type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
manner consistent with the requirements given in the MIME Sniffing specification for finding
the <i>sniffed media type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>

<p>The <dfn id=content-type-sniffing:-image title="Content-Type sniffing: image">rules for sniffing images specifically</dfn> and
the <dfn id=content-type-sniffing:-text-or-binary title="Content-Type sniffing: text or binary">rules for distinguishing if a resource is
text or binary</dfn> are also defined in the Media Type Sniffing specification. Both sets of rules
text or binary</dfn> are also defined in the MIME Sniffing specification. Both sets of rules
return a <a href=#mime-type>MIME type</a> as their result. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>

<p class=warning>It is imperative that the rules in the Media Type Sniffing specification be
<p class=warning>It is imperative that the rules in the MIME Sniffing specification be
followed exactly. When a user agent uses different heuristics for content type detection than the
server expects, security problems can occur. For more details, see the Media Type Sniffing
server expects, security problems can occur. For more details, see the MIME Sniffing
specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>


Expand Down Expand Up @@ -96949,6 +96950,7 @@ if (s = prompt('What is your name?')) {

<!-- http://www.w3.org/2002/06/registering-mediatype.html -->

<!--CLEANUP-->

<h3 id=text/html><span class=secno>16.1 </span><dfn><code>text/html</code></dfn></h3>

Expand Down Expand Up @@ -97055,7 +97057,7 @@ if (s = prompt('What is your name?')) {
<dl><dt>Magic number(s):</dt>
<dd>No sequence of bytes can uniquely identify an HTML
document. More information on detecting HTML documents is
available in the Media Type Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></dd>
available in the MIME Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></dd>
<dt>File extension(s):</dt>
<dd>"<code title="">html</code>" and "<code title="">htm</code>"
are commonly, but certainly not exclusively, used as the
Expand Down
16 changes: 9 additions & 7 deletions source
Expand Up @@ -6434,24 +6434,25 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d


<h4 id="content-type-sniffing">Determining the type of a resource</h4>
<!--CLEANUP-->

<p>The <dfn title="Content-Type">Content-Type metadata</dfn> of a resource must be obtained and
interpreted in a manner consistent with the requirements of the Media Type Sniffing specification.
interpreted in a manner consistent with the requirements of the MIME Sniffing specification.
<a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>

<p>The <dfn title="Content-Type sniffing">sniffed type of a resource</dfn> must be found in a
manner consistent with the requirements given in the Media Type Sniffing specification for finding
the <i>sniffed-type</i> of the relevant sequence of octets. <a
manner consistent with the requirements given in the MIME Sniffing specification for finding
the <i>sniffed media type</i> of the relevant sequence of octets. <a
href="#refsMIMESNIFF">[MIMESNIFF]</a></p>

<p>The <dfn title="Content-Type sniffing: image">rules for sniffing images specifically</dfn> and
the <dfn title="Content-Type sniffing: text or binary">rules for distinguishing if a resource is
text or binary</dfn> are also defined in the Media Type Sniffing specification. Both sets of rules
text or binary</dfn> are also defined in the MIME Sniffing specification. Both sets of rules
return a <span>MIME type</span> as their result. <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>

<p class="warning">It is imperative that the rules in the Media Type Sniffing specification be
<p class="warning">It is imperative that the rules in the MIME Sniffing specification be
followed exactly. When a user agent uses different heuristics for content type detection than the
server expects, security problems can occur. For more details, see the Media Type Sniffing
server expects, security problems can occur. For more details, see the MIME Sniffing
specification. <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>


Expand Down Expand Up @@ -113271,6 +113272,7 @@ if (s = prompt('What is your name?')) {

<!-- http://www.w3.org/2002/06/registering-mediatype.html -->

<!--CLEANUP-->

<h3><dfn><code>text/html</code></dfn></h3>

Expand Down Expand Up @@ -113381,7 +113383,7 @@ if (s = prompt('What is your name?')) {
<dt>Magic number(s):</dt>
<dd>No sequence of bytes can uniquely identify an HTML
document. More information on detecting HTML documents is
available in the Media Type Sniffing specification. <a
available in the MIME Sniffing specification. <a
href="#refsMIMESNIFF">[MIMESNIFF]</a></dd>
<dt>File extension(s):</dt>
<dd>"<code title="">html</code>" and "<code title="">htm</code>"
Expand Down

0 comments on commit 456b840

Please sign in to comment.