Skip to content

Commit

Permalink
[] (0) make <embed> do extension sniffing, for compatibility with ser…
Browse files Browse the repository at this point in the history
…vers that send flash as text/plain, sigh. See Mozilla bug 347736. (credit: cb)

git-svn-id: http://svn.whatwg.org/webapps@1926 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 24, 2008
1 parent 6d0c488 commit 12cde9c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 17 deletions.
38 changes: 29 additions & 9 deletions index
Expand Up @@ -16459,17 +16459,37 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
being embedded is defined as follows:

<ol>
<li>If the element has a <code title=attr-embed-type><a
href="#type4">type</a></code> attribute, then the value of the <code
title=attr-embed-type><a href="#type4">type</a></code> attribute is the
<span>content's type</span>.
<li>
<p>If the element has a <code title=attr-embed-type><a
href="#type4">type</a></code> attribute, then the value of the <code
title=attr-embed-type><a href="#type4">type</a></code> attribute is the
<span>content's type</span>.

<li>
<p>Otherwise, if the <a href="#ltpathgt" title=url-path>&lt;path&gt;</a>
component of the <a href="#url">URL</a> of the specified resource <!--
XXX before or after redirects? -->
matches a pattern that a <a href="#plugin">plugin</a> supports, then the
<span>content's type</span> is the type that that plugin can handle.</p>

<p class=example>For example, a plugin might say that it can handle
resources with <a href="#ltpathgt" title=url-path>&lt;path&gt;</a>
components that end with the four character string "<code
title="">.swf</code>".</p>

<li>Otherwise, if the specified resource has <a href="#content-type5"
title=Content-Type>explicit Content-Type metadata</a>, then that is the
<span>content's type</span>.
<p class=big-issue>It would be better if browsers didn't do extension
sniffing like this, and only based their decision on the actual contents
of the resource. Couldn't we just apply the <span>sniffed type of a
resource</span> steps?</p>

<li>Otherwise, the content has no type and there can be no appropriate <a
href="#plugin">plugin</a> for it.
<li>
<p>Otherwise, if the specified resource has <a href="#content-type5"
title=Content-Type>explicit Content-Type metadata</a>, then that is the
<span>content's type</span>.

<li>
<p>Otherwise, the content has no type and there can be no appropriate <a
href="#plugin">plugin</a> for it.
</ol>

<p>Whether the resource is fetched successfully or not must be ignored when
Expand Down
36 changes: 28 additions & 8 deletions source
Expand Up @@ -14111,17 +14111,37 @@ the time Marco had stuck his tongue out...&lt;/p></pre>

<ol>

<li>If the element has a <code title="attr-embed-type">type</code>
attribute, then the value of the <code
title="attr-embed-type">type</code> attribute is the
<span>content's type</span>.</li>
<li><p>If the element has a <code
title="attr-embed-type">type</code> attribute, then the value of
the <code title="attr-embed-type">type</code> attribute is the
<span>content's type</span>.</p></li>

<li>Otherwise, if the specified resource has <span
<li>

<p>Otherwise, if the <span title="url-path">&lt;path&gt;</span>
component of the <span>URL</span> of the specified resource <!--
XXX before or after redirects? --> matches a pattern that a
<span>plugin</span> supports, then the <span>content's type</span>
is the type that that plugin can handle.</p>

<p class="example">For example, a plugin might say that it can
handle resources with <span title="url-path">&lt;path&gt;</span>
components that end with the four character string "<code
title="">.swf</code>".</p>

<p class="big-issue">It would be better if browsers didn't do
extension sniffing like this, and only based their decision on the
actual contents of the resource. Couldn't we just apply the
<span>sniffed type of a resource</span> steps?</p>

</li>

<li><p>Otherwise, if the specified resource has <span
title="Content-Type">explicit Content-Type metadata</span>, then
that is the <span>content's type</span>.</li>
that is the <span>content's type</span>.</p></li>

<li>Otherwise, the content has no type and there can be no
appropriate <span>plugin</span> for it.</li>
<li><p>Otherwise, the content has no type and there can be no
appropriate <span>plugin</span> for it.</p></li>

</ol>

Expand Down

0 comments on commit 12cde9c

Please sign in to comment.