Skip to content

Commit

Permalink
Expose fragments of request URLs
Browse files Browse the repository at this point in the history
Fixes #214. Though only for request URLs as exposing the fragment on a
response is not an accurate representation of what happens.
  • Loading branch information
annevk committed Jun 9, 2016
1 parent df09f7b commit d89d1e7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 48 deletions.
47 changes: 23 additions & 24 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ <h2 id="infrastructure"><span class="secno">3 </span>Infrastructure</h2>

<hr>

<p>A <dfn id="fetch-url">fetch URL</dfn> is a <a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> for
which implementations need not store the
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-fragment" title="concept-url-fragment">fragment</a> as it is never
exposed. When <a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-serializer" title="concept-url-serializer">serialized</a>,
the <i title="">exclude fragment flag</i> is set, meaning implementations can store the
<p id="fetch-url">A <dfn id="response-url">response URL</dfn> is a
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> for which implementations need not store the
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-fragment" title="concept-url-fragment">fragment</a> as it is never exposed. When
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-serializer" title="concept-url-serializer">serialized</a>, the
<i title="">exclude fragment flag</i> is set, meaning implementations can store the
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-fragment" title="concept-url-fragment">fragment</a> nonetheless.

<hr>
Expand Down Expand Up @@ -678,12 +678,13 @@ <h4 id="requests"><span class="secno">3.1.5 </span>Requests</h4>
described in <a href="#concept-http-fetch" title="concept-http-fetch">HTTP fetch</a>.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn id="concept-request-url" title="concept-request-url">url</dfn> (a <a href="#fetch-url">fetch URL</a>).
<dfn id="concept-request-url" title="concept-request-url">url</dfn> (a
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a>).

<p class="note no-backref">Implementations are encouraged to make this a pointer to the first
<a href="#fetch-url">fetch URL</a> in <a href="#concept-request" title="concept-request">request</a>'s
<a href="#concept-request-url-list" title="concept-request-url-list">url list</a>. It is provided as a distinct field solely for
the convenience of other standards hooking into Fetch.
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> in
<a href="#concept-request" title="concept-request">request</a>'s <a href="#concept-request-url-list" title="concept-request-url-list">url list</a>.
It is provided as a distinct field solely for the convenience of other standards hooking into Fetch.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn id="local-urls-only-flag">local-URLs-only flag</dfn>. Unless stated otherwise it is unset.
Expand Down Expand Up @@ -1087,14 +1088,14 @@ <h4 id="requests"><span class="secno">3.1.5 </span>Requests</h4>

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn id="concept-request-url-list" title="concept-request-url-list">url list</dfn> (a list of one or more
<a href="#fetch-url" title="fetch URL">fetch URLs</a>). Unless stated otherwise, it is a list
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URLs</a>). Unless stated otherwise, it is a list
containing a copy of <a href="#concept-request" title="concept-request">request</a>'s
<a href="#concept-request-url" title="concept-request-url">url</a>.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn id="concept-request-current-url" title="concept-request-current-url">current url</dfn>. It is a pointer to the last
<a href="#fetch-url">fetch URL</a> in <a href="#concept-request" title="concept-request">request</a>'s
<a href="#concept-request-url-list" title="concept-request-url-list">url list</a>.
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> in
<a href="#concept-request" title="concept-request">request</a>'s <a href="#concept-request-url-list" title="concept-request-url-list">url list</a>.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn id="concept-request-redirect-count" title="concept-request-redirect-count">redirect count</dfn>. Unless stated otherwise,
Expand Down Expand Up @@ -1178,20 +1179,18 @@ <h4 id="responses"><span class="secno">3.1.6 </span>Responses</h4>
<i title="">end-user abort</i>, <i title="">fatal</i>, or <i title="">timeout</i>.

<p>A <a href="#concept-response" title="concept-response">response</a> has an associated
<dfn id="concept-response-url" title="concept-response-url">url</dfn>. It is a pointer to the last
<a href="#fetch-url">fetch URL</a> in <a href="#concept-response" title="concept-response">response</a>'s
<a href="#concept-response-url-list" title="concept-response-url-list">url list</a> and null if
<a href="#concept-response" title="concept-response">response</a>'s
<dfn id="concept-response-url" title="concept-response-url">url</dfn>. It is a pointer to the last <a href="#response-url">response URL</a> in
<a href="#concept-response" title="concept-response">response</a>'s <a href="#concept-response-url-list" title="concept-response-url-list">url list</a>
and null if <a href="#concept-response" title="concept-response">response</a>'s
<a href="#concept-response-url-list" title="concept-response-url-list">url list</a> is the empty list.

<p>A <a href="#concept-response" title="concept-response">response</a> has an associated
<dfn id="concept-response-url-list" title="concept-response-url-list">url list</dfn> (a list of zero or more
<a href="#fetch-url" title="fetch URL">fetch URLs</a>). Unless stated otherwise, it is the empty list.
<a href="#response-url" title="response URL">response URLs</a>). Unless stated otherwise, it is the empty list.

<p class="note no-backref">Except for the last <a href="#fetch-url">fetch URL</a>, if any, a
<a href="#concept-response" title="concept-response">response</a>'s
<a href="#concept-response-url-list" title="concept-response-url-list">url list</a> cannot be exposed to script. That
would violate <a href="#atomic-http-redirect-handling">atomic HTTP redirect handling</a>.
<p class="note no-backref">Except for the last <a href="#response-url">response URL</a>, if any, a
<a href="#concept-response" title="concept-response">response</a>'s <a href="#concept-response-url-list" title="concept-response-url-list">url list</a>
cannot be exposed to script. That would violate <a href="#atomic-http-redirect-handling">atomic HTTP redirect handling</a>.

<p>A <a href="#concept-response" title="concept-response">response</a> has an associated
<dfn id="concept-response-status" title="concept-response-status">status</dfn>, which is a <a href="#concept-status">status</a>. Unless stated
Expand Down Expand Up @@ -3806,7 +3805,8 @@ <h3 id="cors-preflight-cache"><span class="secno">5.8 </span>CORS-preflight cach

<ul class="brief">
<li><dfn id="concept-cache-origin" title="concept-cache-origin">origin</dfn> (an <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/browsers.html#origin">origin</a>)
<li><dfn id="concept-cache-url" title="concept-cache-url">url</dfn> (a <a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#url">URL</a>
<li><dfn id="concept-cache-url" title="concept-cache-url">url</dfn> (a
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a>)
<li><dfn id="concept-cache-max-age" title="concept-cache-max-age">max-age</dfn> (a number of seconds)
<li><dfn id="concept-cache-credentials" title="concept-cache-credentials">credentials</dfn> (a boolean)
<li><dfn id="concept-cache-method" title="concept-cache-method">method</dfn> (null, `<code>*</code>`, or a
Expand Down Expand Up @@ -4880,8 +4880,7 @@ <h3 id="request-class"><span class="secno">6.3 </span>Request class</h3>
<p>The <dfn id="dom-request-url" title="dom-Request-url"><code>url</code></dfn> attribute's getter must
return <a href="#concept-request-request" title="concept-Request-request">request</a>'s
<a href="#concept-request-url" title="concept-request-url">url</a>,
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-serializer" title="concept-url-serializer">serialized</a> with the
<i title="">exclude-fragment flag</i> set.
<a class="external" data-anolis-spec="url" href="https://url.spec.whatwg.org/#concept-url-serializer" title="concept-url-serializer">serialized</a>.

<p>The <dfn id="dom-request-headers" title="dom-Request-headers"><code>headers</code></dfn> attribute's getter must
return the associated <a href="#headers"><code>Headers</code></a> object.
Expand Down
47 changes: 23 additions & 24 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ <h2>Infrastructure</h2>

<hr>

<p>A <dfn>fetch URL</dfn> is a <span data-anolis-spec=url title=concept-url>URL</span> for
which implementations need not store the
<span data-anolis-spec=url title=concept-url-fragment>fragment</span> as it is never
exposed. When <span data-anolis-spec=url title=concept-url-serializer>serialized</span>,
the <i title>exclude fragment flag</i> is set, meaning implementations can store the
<p id="fetch-url">A <dfn>response URL</dfn> is a
<span data-anolis-spec=url title=concept-url>URL</span> for which implementations need not store the
<span data-anolis-spec=url title=concept-url-fragment>fragment</span> as it is never exposed. When
<span data-anolis-spec=url title=concept-url-serializer>serialized</span>, the
<i title>exclude fragment flag</i> is set, meaning implementations can store the
<span data-anolis-spec=url title=concept-url-fragment>fragment</span> nonetheless.

<hr>
Expand Down Expand Up @@ -606,12 +606,13 @@ <h4>Requests</h4>
described in <span title=concept-http-fetch>HTTP fetch</span>.

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-url>url</dfn> (a <span>fetch URL</span>).
<dfn title=concept-request-url>url</dfn> (a
<span data-anolis-spec=url title=concept-url>URL</span>).

<p class="note no-backref">Implementations are encouraged to make this a pointer to the first
<span>fetch URL</span> in <span title=concept-request>request</span>'s
<span title=concept-request-url-list>url list</span>. It is provided as a distinct field solely for
the convenience of other standards hooking into Fetch.
<span data-anolis-spec=url title=concept-url>URL</span> in
<span title=concept-request>request</span>'s <span title=concept-request-url-list>url list</span>.
It is provided as a distinct field solely for the convenience of other standards hooking into Fetch.

<p>A <span title=concept-request>request</span> has an associated
<dfn>local-URLs-only flag</dfn>. Unless stated otherwise it is unset.
Expand Down Expand Up @@ -1015,14 +1016,14 @@ <h4>Requests</h4>

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-url-list>url list</dfn> (a list of one or more
<span title="fetch URL">fetch URLs</span>). Unless stated otherwise, it is a list
<span data-anolis-spec=url title=concept-url>URLs</span>). Unless stated otherwise, it is a list
containing a copy of <span title=concept-request>request</span>'s
<span title=concept-request-url>url</span>.

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-current-url>current url</dfn>. It is a pointer to the last
<span>fetch URL</span> in <span title=concept-request>request</span>'s
<span title=concept-request-url-list>url list</span>.
<span data-anolis-spec=url title=concept-url>URL</span> in
<span title=concept-request>request</span>'s <span title=concept-request-url-list>url list</span>.

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-redirect-count>redirect count</dfn>. Unless stated otherwise,
Expand Down Expand Up @@ -1106,20 +1107,18 @@ <h4>Responses</h4>
<i title>end-user abort</i>, <i title>fatal</i>, or <i title>timeout</i>.

<p>A <span title=concept-response>response</span> has an associated
<dfn title=concept-response-url>url</dfn>. It is a pointer to the last
<span>fetch URL</span> in <span title=concept-response>response</span>'s
<span title=concept-response-url-list>url list</span> and null if
<span title=concept-response>response</span>'s
<dfn title=concept-response-url>url</dfn>. It is a pointer to the last <span>response URL</span> in
<span title=concept-response>response</span>'s <span title=concept-response-url-list>url list</span>
and null if <span title=concept-response>response</span>'s
<span title=concept-response-url-list>url list</span> is the empty list.

<p>A <span title=concept-response>response</span> has an associated
<dfn title=concept-response-url-list>url list</dfn> (a list of zero or more
<span title="fetch URL">fetch URLs</span>). Unless stated otherwise, it is the empty list.
<span title="response URL">response URLs</span>). Unless stated otherwise, it is the empty list.

<p class="note no-backref">Except for the last <span>fetch URL</span>, if any, a
<span title=concept-response>response</span>'s
<span title=concept-response-url-list>url list</span> cannot be exposed to script. That
would violate <span>atomic HTTP redirect handling</span>.
<p class="note no-backref">Except for the last <span>response URL</span>, if any, a
<span title=concept-response>response</span>'s <span title=concept-response-url-list>url list</span>
cannot be exposed to script. That would violate <span>atomic HTTP redirect handling</span>.

<p>A <span title=concept-response>response</span> has an associated
<dfn title=concept-response-status>status</dfn>, which is a <span>status</span>. Unless stated
Expand Down Expand Up @@ -3734,7 +3733,8 @@ <h3>CORS-preflight cache</h3>

<ul class=brief>
<li><dfn title=concept-cache-origin>origin</dfn> (an <span data-anolis-spec=html>origin</span>)
<li><dfn title=concept-cache-url>url</dfn> (a <span data-anolis-spec=url>URL</span>
<li><dfn title=concept-cache-url>url</dfn> (a
<span data-anolis-spec=url title=concept-url>URL</span>)
<li><dfn title=concept-cache-max-age>max-age</dfn> (a number of seconds)
<li><dfn title=concept-cache-credentials>credentials</dfn> (a boolean)
<li><dfn title=concept-cache-method>method</dfn> (null, `<code>*</code>`, or a
Expand Down Expand Up @@ -4808,8 +4808,7 @@ <h3>Request class</h3>
<p>The <dfn title=dom-Request-url><code>url</code></dfn> attribute's getter must
return <span title=concept-Request-request>request</span>'s
<span title=concept-request-url>url</span>,
<span data-anolis-spec=url title=concept-url-serializer>serialized</span> with the
<i title>exclude-fragment flag</i> set.
<span data-anolis-spec=url title=concept-url-serializer>serialized</span>.

<p>The <dfn title=dom-Request-headers><code>headers</code></dfn> attribute's getter must
return the associated <code>Headers</code> object.
Expand Down

0 comments on commit d89d1e7

Please sign in to comment.