Skip to content

Commit

Permalink
Fix #176: move a set of steps in HTTP-network fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Dec 15, 2015
1 parent 27c6ab1 commit bcf66dd
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 104 deletions.
104 changes: 52 additions & 52 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -2702,58 +2702,6 @@ <h3 id="http-network-fetch"><span class="secno">5.5 </span>HTTP-network fetch</h

<p><a href="#read-a-request" title="Read a request">Read <var>request</var></a>.

<p>Run these substeps <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>, after the outer
set of steps has returned:

<ol>
<li><p>If <var>response</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> is
non-null, set <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>'s
<a href="#concept-body-length" title="concept-body-length">length</a> to <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>'s payload body length.
<!-- XXX xref payload body -->

<li>
<p>Whenever one or more bytes are transmitted, let <var>bytes</var> be the
transmitted bytes and run these subsubsteps:

<ol>
<li><p>Increase <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>'s
<a href="#concept-body-transmitted" title="concept-body-transmitted">transmitted</a> with <var>bytes</var>'
length.

<li><p>Let <var>codings</var> be the result of
<a href="#concept-header-parse" title="concept-header-parse">parsing</a> `<code title="">Content-Encoding</code>`
in <var>response</var>'s
<a href="#concept-response-header-list" title="concept-response-header-list">header list</a>.

<li><p>Set <var>bytes</var> to the result of
<a href="#handle-content-codings" title="handle content codings">handling content codings</a> given
<var>codings</var> and <var>bytes</var>.

<li><p>Push <var>bytes</var> to <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>.
<!-- XXX xref payload body / streams -->
</ol>

<p class="note no-backref">This means that the `<code title="">Content-Length</code>`
<a href="#concept-header" title="concept-header">header</a> is no longer reliable. A
<a href="#concept-response" title="concept-response">response</a> will still include it, but it cannot be
used, except for debugging and logging purposes.

<li>If at any point <a href="#concept-fetch" title="concept-fetch">fetch</a> is
<a href="#concept-fetch-terminate" title="concept-fetch-terminate">terminated</a> with reason
<var>reason</var>, set <var>response</var>'s
<a href="#concept-response-termination-reason" title="concept-response-termination-reason">termination reason</a> to
<var>reason</var>.
</ol>

<p class="note no-backref">These are run <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>
as at this point it is unclear whether <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a> is relevant (<var>response</var>
might be a redirect).

<li>
<p><a href="#concept-header-list-delete" title="concept-header-list-delete">Delete</a>
`<code title="">Content-Encoding</code>` from <var>response</var>'s
Expand Down Expand Up @@ -2822,6 +2770,58 @@ <h3 id="http-network-fetch"><span class="secno">5.5 </span>HTTP-network fetch</h
again free.
</ol>

<li>
<p>Run these substeps <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>:

<ol>
<li><p>If <var>response</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> is
non-null, set <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>'s
<a href="#concept-body-length" title="concept-body-length">length</a> to <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>'s payload body length.
<!-- XXX xref payload body -->

<li>
<p>Whenever one or more bytes are transmitted, let <var>bytes</var> be the
transmitted bytes and run these subsubsteps:

<ol>
<li><p>Increase <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>'s
<a href="#concept-body-transmitted" title="concept-body-transmitted">transmitted</a> with <var>bytes</var>'
length.

<li><p>Let <var>codings</var> be the result of
<a href="#concept-header-parse" title="concept-header-parse">parsing</a> `<code title="">Content-Encoding</code>`
in <var>response</var>'s
<a href="#concept-response-header-list" title="concept-response-header-list">header list</a>.

<li><p>Set <var>bytes</var> to the result of
<a href="#handle-content-codings" title="handle content codings">handling content codings</a> given
<var>codings</var> and <var>bytes</var>.

<li><p>Push <var>bytes</var> to <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a>.
<!-- XXX xref payload body / streams -->
</ol>

<p class="note no-backref">This means that the `<code title="">Content-Length</code>`
<a href="#concept-header" title="concept-header">header</a> is no longer reliable. A
<a href="#concept-response" title="concept-response">response</a> will still include it, but it cannot be
used, except for debugging and logging purposes.

<li>If at any point <a href="#concept-fetch" title="concept-fetch">fetch</a> is
<a href="#concept-fetch-terminate" title="concept-fetch-terminate">terminated</a> with reason
<var>reason</var>, set <var>response</var>'s
<a href="#concept-response-termination-reason" title="concept-response-termination-reason">termination reason</a> to
<var>reason</var>.
</ol>

<p class="note no-backref">These are run <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>
as at this point it is unclear whether <var>response</var>'s
<a href="#concept-response-body" title="concept-response-body">body</a> is relevant (<var>response</var>
might be a redirect).

<li><p>Return <var>response</var>. <span class="note no-backref">Typically
<var>response</var>'s <a href="#concept-response-body" title="concept-response-body">body</a> is still being
pushed to after returning.</span>
Expand Down
104 changes: 52 additions & 52 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -2641,58 +2641,6 @@ <h3>HTTP-network fetch</h3>

<p><span title="Read a request">Read <var>request</var></span>.

<p>Run these substeps <span data-anolis-spec=html>in parallel</span>, after the outer
set of steps has returned:

<ol>
<li><p>If <var>response</var>'s <span title=concept-response-body>body</span> is
non-null, set <var>response</var>'s
<span title=concept-response-body>body</span>'s
<span title=concept-body-length>length</span> to <var>response</var>'s
<span title=concept-response-body>body</span>'s payload body length.
<!-- XXX xref payload body -->

<li>
<p>Whenever one or more bytes are transmitted, let <var>bytes</var> be the
transmitted bytes and run these subsubsteps:

<ol>
<li><p>Increase <var>response</var>'s
<span title=concept-response-body>body</span>'s
<span title=concept-body-transmitted>transmitted</span> with <var>bytes</var>'
length.

<li><p>Let <var>codings</var> be the result of
<span title=concept-header-parse>parsing</span> `<code title>Content-Encoding</code>`
in <var>response</var>'s
<span title=concept-response-header-list>header list</span>.

<li><p>Set <var>bytes</var> to the result of
<span title="handle content codings">handling content codings</span> given
<var>codings</var> and <var>bytes</var>.

<li><p>Push <var>bytes</var> to <var>response</var>'s
<span title=concept-response-body>body</span>.
<!-- XXX xref payload body / streams -->
</ol>

<p class="note no-backref">This means that the `<code title>Content-Length</code>`
<span title=concept-header>header</span> is no longer reliable. A
<span title=concept-response>response</span> will still include it, but it cannot be
used, except for debugging and logging purposes.

<li>If at any point <span title=concept-fetch>fetch</span> is
<span title=concept-fetch-terminate>terminated</span> with reason
<var>reason</var>, set <var>response</var>'s
<span title=concept-response-termination-reason>termination reason</span> to
<var>reason</var>.
</ol>

<p class="note no-backref">These are run <span data-anolis-spec=html>in parallel</span>
as at this point it is unclear whether <var>response</var>'s
<span title=concept-response-body>body</span> is relevant (<var>response</var>
might be a redirect).

<li>
<p><span title=concept-header-list-delete>Delete</span>
`<code title>Content-Encoding</code>` from <var>response</var>'s
Expand Down Expand Up @@ -2761,6 +2709,58 @@ <h3>HTTP-network fetch</h3>
again free.
</ol>

<li>
<p>Run these substeps <span data-anolis-spec=html>in parallel</span>:

<ol>
<li><p>If <var>response</var>'s <span title=concept-response-body>body</span> is
non-null, set <var>response</var>'s
<span title=concept-response-body>body</span>'s
<span title=concept-body-length>length</span> to <var>response</var>'s
<span title=concept-response-body>body</span>'s payload body length.
<!-- XXX xref payload body -->

<li>
<p>Whenever one or more bytes are transmitted, let <var>bytes</var> be the
transmitted bytes and run these subsubsteps:

<ol>
<li><p>Increase <var>response</var>'s
<span title=concept-response-body>body</span>'s
<span title=concept-body-transmitted>transmitted</span> with <var>bytes</var>'
length.

<li><p>Let <var>codings</var> be the result of
<span title=concept-header-parse>parsing</span> `<code title>Content-Encoding</code>`
in <var>response</var>'s
<span title=concept-response-header-list>header list</span>.

<li><p>Set <var>bytes</var> to the result of
<span title="handle content codings">handling content codings</span> given
<var>codings</var> and <var>bytes</var>.

<li><p>Push <var>bytes</var> to <var>response</var>'s
<span title=concept-response-body>body</span>.
<!-- XXX xref payload body / streams -->
</ol>

<p class="note no-backref">This means that the `<code title>Content-Length</code>`
<span title=concept-header>header</span> is no longer reliable. A
<span title=concept-response>response</span> will still include it, but it cannot be
used, except for debugging and logging purposes.

<li>If at any point <span title=concept-fetch>fetch</span> is
<span title=concept-fetch-terminate>terminated</span> with reason
<var>reason</var>, set <var>response</var>'s
<span title=concept-response-termination-reason>termination reason</span> to
<var>reason</var>.
</ol>

<p class="note no-backref">These are run <span data-anolis-spec=html>in parallel</span>
as at this point it is unclear whether <var>response</var>'s
<span title=concept-response-body>body</span> is relevant (<var>response</var>
might be a redirect).

<li><p>Return <var>response</var>. <span class="note no-backref">Typically
<var>response</var>'s <span title=concept-response-body>body</span> is still being
pushed to after returning.</span>
Expand Down

0 comments on commit bcf66dd

Please sign in to comment.