Skip to content

Commit

Permalink
Remove the GET method restriction for data URLs
Browse files Browse the repository at this point in the history
Fixes #339.
  • Loading branch information
annevk committed Aug 23, 2016
1 parent 075ab68 commit c4cb4f4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
26 changes: 14 additions & 12 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -2772,9 +2772,13 @@ <h3 id="basic-fetch"><span class="secno">5.2 </span>Basic fetch</h3>
<a href="#concept-request-current-url" title="concept-request-current-url">current url</a>'s
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-object" title="concept-url-object">object</a>.

<li><p>If <var>request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a> is <em>not</em>
`<code title="">GET</code>` or <var>blob</var> is null, return a
<a href="#concept-network-error" title="concept-network-error">network error</a>.
<li>
<p>If <var>request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a> is not
`<code>GET</code>` or <var>blob</var> is null, then return a
<a href="#concept-network-error" title="concept-network-error">network error</a>.

<p class="note">The `<code>GET</code>` <a href="#concept-method" title="concept-method">method</a> restriction
serves no useful purpose other than being interoperable.

<li><p>Let <var>response</var> be a new
<a href="#concept-response" title="concept-response">response</a>.
Expand Down Expand Up @@ -2806,16 +2810,14 @@ <h3 id="basic-fetch"><span class="secno">5.2 </span>Basic fetch</h3>

<dt>"<code title="">data</code>"
<dd>
<p>If <var>request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a> is
`<code title="">GET</code>` and
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
<var>request</var>'s <a href="#concept-request-current-url" title="concept-request-current-url">current url</a>
does not return failure, return a <a href="#concept-response" title="concept-response">response</a> whose
<p>If <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
<var>request</var>'s <a href="#concept-request-current-url" title="concept-request-current-url">current url</a> does not return
failure, then return a <a href="#concept-response" title="concept-response">response</a> whose
<a href="#concept-response-header-list" title="concept-response-header-list">header list</a> consist of a single
<a href="#concept-header" title="concept-header">header</a> whose
<a href="#concept-header-name" title="concept-header-name">name</a> is `<code title="">Content-Type</code>` and
<a href="#concept-header-value" title="concept-header-value">value</a> is the MIME type and parameters returned
from <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
<a href="#concept-header" title="concept-header">header</a> whose <a href="#concept-header-name" title="concept-header-name">name</a> is
`<code title="">Content-Type</code>` and <a href="#concept-header-value" title="concept-header-value">value</a> is the
MIME type and parameters returned from
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
<a href="#concept-response-body" title="concept-response-body">body</a> is the data returned from
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>, and
<a href="#concept-response-https-state" title="concept-response-https-state">HTTPS state</a> is <var>request</var>'s
Expand Down
26 changes: 14 additions & 12 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -2701,9 +2701,13 @@ <h3>Basic fetch</h3>
<span title=concept-request-current-url>current url</span>'s
<span data-anolis-spec=url title=concept-url-object>object</span>.

<li><p>If <var>request</var>'s <span title=concept-request-method>method</span> is <em>not</em>
`<code title>GET</code>` or <var>blob</var> is null, return a
<span title=concept-network-error>network error</span>.
<li>
<p>If <var>request</var>'s <span title=concept-request-method>method</span> is not
`<code>GET</code>` or <var>blob</var> is null, then return a
<span title=concept-network-error>network error</span>.

<p class="note">The `<code>GET</code>` <span title=concept-method>method</span> restriction
serves no useful purpose other than being interoperable.

<li><p>Let <var>response</var> be a new
<span title=concept-response>response</span>.
Expand Down Expand Up @@ -2735,16 +2739,14 @@ <h3>Basic fetch</h3>

<dt>"<code title>data</code>"
<dd>
<p>If <var>request</var>'s <span title=concept-request-method>method</span> is
`<code title>GET</code>` and
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
<var>request</var>'s <span title=concept-request-current-url>current url</span>
does not return failure, return a <span title=concept-response>response</span> whose
<p>If <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
<var>request</var>'s <span title=concept-request-current-url>current url</span> does not return
failure, then return a <span title=concept-response>response</span> whose
<span title=concept-response-header-list>header list</span> consist of a single
<span title=concept-header>header</span> whose
<span title=concept-header-name>name</span> is `<code title>Content-Type</code>` and
<span title=concept-header-value>value</span> is the MIME type and parameters returned
from <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
<span title=concept-header>header</span> whose <span title=concept-header-name>name</span> is
`<code title>Content-Type</code>` and <span title=concept-header-value>value</span> is the
MIME type and parameters returned from
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
<span title=concept-response-body>body</span> is the data returned from
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>, and
<span title=concept-response-https-state>HTTPS state</span> is <var>request</var>'s
Expand Down

0 comments on commit c4cb4f4

Please sign in to comment.