Skip to content

Commit c4cb4f4

Browse files
committed
Remove the GET method restriction for data URLs
Fixes #339.
1 parent 075ab68 commit c4cb4f4

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

Overview.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,9 +2772,13 @@ <h3 id="basic-fetch"><span class="secno">5.2 </span>Basic fetch</h3>
27722772
<a href="#concept-request-current-url" title="concept-request-current-url">current url</a>'s
27732773
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-object" title="concept-url-object">object</a>.
27742774

2775-
<li><p>If <var>request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a> is <em>not</em>
2776-
`<code title="">GET</code>` or <var>blob</var> is null, return a
2777-
<a href="#concept-network-error" title="concept-network-error">network error</a>.
2775+
<li>
2776+
<p>If <var>request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a> is not
2777+
`<code>GET</code>` or <var>blob</var> is null, then return a
2778+
<a href="#concept-network-error" title="concept-network-error">network error</a>.
2779+
2780+
<p class="note">The `<code>GET</code>` <a href="#concept-method" title="concept-method">method</a> restriction
2781+
serves no useful purpose other than being interoperable.
27782782

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

28072811
<dt>"<code title="">data</code>"
28082812
<dd>
2809-
<p>If <var>request</var>'s <a href="#concept-request-method" title="concept-request-method">method</a> is
2810-
`<code title="">GET</code>` and
2811-
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
2812-
<var>request</var>'s <a href="#concept-request-current-url" title="concept-request-current-url">current url</a>
2813-
does not return failure, return a <a href="#concept-response" title="concept-response">response</a> whose
2813+
<p>If <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
2814+
<var>request</var>'s <a href="#concept-request-current-url" title="concept-request-current-url">current url</a> does not return
2815+
failure, then return a <a href="#concept-response" title="concept-response">response</a> whose
28142816
<a href="#concept-response-header-list" title="concept-response-header-list">header list</a> consist of a single
2815-
<a href="#concept-header" title="concept-header">header</a> whose
2816-
<a href="#concept-header-name" title="concept-header-name">name</a> is `<code title="">Content-Type</code>` and
2817-
<a href="#concept-header-value" title="concept-header-value">value</a> is the MIME type and parameters returned
2818-
from <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
2817+
<a href="#concept-header" title="concept-header">header</a> whose <a href="#concept-header-name" title="concept-header-name">name</a> is
2818+
`<code title="">Content-Type</code>` and <a href="#concept-header-value" title="concept-header-value">value</a> is the
2819+
MIME type and parameters returned from
2820+
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
28192821
<a href="#concept-response-body" title="concept-response-body">body</a> is the data returned from
28202822
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>, and
28212823
<a href="#concept-response-https-state" title="concept-response-https-state">HTTPS state</a> is <var>request</var>'s

Overview.src.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,9 +2701,13 @@ <h3>Basic fetch</h3>
27012701
<span title=concept-request-current-url>current url</span>'s
27022702
<span data-anolis-spec=url title=concept-url-object>object</span>.
27032703

2704-
<li><p>If <var>request</var>'s <span title=concept-request-method>method</span> is <em>not</em>
2705-
`<code title>GET</code>` or <var>blob</var> is null, return a
2706-
<span title=concept-network-error>network error</span>.
2704+
<li>
2705+
<p>If <var>request</var>'s <span title=concept-request-method>method</span> is not
2706+
`<code>GET</code>` or <var>blob</var> is null, then return a
2707+
<span title=concept-network-error>network error</span>.
2708+
2709+
<p class="note">The `<code>GET</code>` <span title=concept-method>method</span> restriction
2710+
serves no useful purpose other than being interoperable.
27072711

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

27362740
<dt>"<code title>data</code>"
27372741
<dd>
2738-
<p>If <var>request</var>'s <span title=concept-request-method>method</span> is
2739-
`<code title>GET</code>` and
2740-
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
2741-
<var>request</var>'s <span title=concept-request-current-url>current url</span>
2742-
does not return failure, return a <span title=concept-response>response</span> whose
2742+
<p>If <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a> from
2743+
<var>request</var>'s <span title=concept-request-current-url>current url</span> does not return
2744+
failure, then return a <span title=concept-response>response</span> whose
27432745
<span title=concept-response-header-list>header list</span> consist of a single
2744-
<span title=concept-header>header</span> whose
2745-
<span title=concept-header-name>name</span> is `<code title>Content-Type</code>` and
2746-
<span title=concept-header-value>value</span> is the MIME type and parameters returned
2747-
from <a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
2746+
<span title=concept-header>header</span> whose <span title=concept-header-name>name</span> is
2747+
`<code title>Content-Type</code>` and <span title=concept-header-value>value</span> is the
2748+
MIME type and parameters returned from
2749+
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>,
27482750
<span title=concept-response-body>body</span> is the data returned from
27492751
<a href="https://simonsapin.github.io/data-urls/">obtaining a resource</a>, and
27502752
<span title=concept-response-https-state>HTTPS state</span> is <var>request</var>'s

0 commit comments

Comments
 (0)