Skip to content

Commit

Permalink
Revert #111: allow redirects to data URLs
Browse files Browse the repository at this point in the history
The rationale for forbidding redirects to data URLs was not sound enough. Therefore this commit
reverts f986c43 which
introduced the restriction.
  • Loading branch information
annevk committed Jan 8, 2016
1 parent 200e745 commit 31f65e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions Overview.html
Expand Up @@ -2273,11 +2273,8 @@ <h3 id="http-fetch"><span class="secno">5.3 </span>HTTP fetch</h3>
<var>location</var> with <var>request</var>'s
<a href="#concept-request-current-url" title="concept-request-current-url">current url</a>.

<li><p>If <var>locationURL</var> is failure or its
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-scheme" title="concept-url-scheme">scheme</a> is "<code title="">data</code>",
return a <a href="#concept-network-error" title="concept-network-error">network error</a>.
<!-- If we ever allow redirects to data URLs again make sure to unset the
same-origin data-URL flag. -->
<li><p>If <var>locationURL</var> is failure, 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-redirect-count" title="concept-request-redirect-count">redirect count</a> is twenty, return a
Expand All @@ -2286,6 +2283,8 @@ <h3 id="http-fetch"><span class="secno">5.3 </span>HTTP fetch</h3>
<li><p>Increase <var>request</var>'s
<a href="#concept-request-redirect-count" title="concept-request-redirect-count">redirect count</a> by one.

<li><p>Unset <var title="">request</var>'s <a href="#same-origin-data-url-flag">same-origin data-URL flag</a>.

<li><p>If <var>request</var>'s
<a href="#concept-request-redirect-mode" title="concept-request-redirect-mode">redirect mode</a> is
"<code title="">manual</code>", set <var>response</var> to an
Expand Down
9 changes: 4 additions & 5 deletions Overview.src.html
Expand Up @@ -2212,11 +2212,8 @@ <h3>HTTP fetch</h3>
<var>location</var> with <var>request</var>'s
<span title=concept-request-current-url>current url</span>.

<li><p>If <var>locationURL</var> is failure or its
<span data-anolis-spec=url title=concept-url-scheme>scheme</span> is "<code title>data</code>",
return a <span title=concept-network-error>network error</span>.
<!-- If we ever allow redirects to data URLs again make sure to unset the
same-origin data-URL flag. -->
<li><p>If <var>locationURL</var> is failure, return a
<span title=concept-network-error>network error</span>.

<li><p>If <var>request</var>'s
<span title=concept-request-redirect-count>redirect count</span> is twenty, return a
Expand All @@ -2225,6 +2222,8 @@ <h3>HTTP fetch</h3>
<li><p>Increase <var>request</var>'s
<span title=concept-request-redirect-count>redirect count</span> by one.

<li><p>Unset <var title>request</var>'s <span>same-origin data-URL flag</span>.

<li><p>If <var>request</var>'s
<span title=concept-request-redirect-mode>redirect mode</span> is
"<code title>manual</code>", set <var>response</var> to an
Expand Down

0 comments on commit 31f65e4

Please sign in to comment.