Skip to content

Commit b9b0b80

Browse files
committed
nits and some minor errors
1 parent 10545d2 commit b9b0b80

File tree

1 file changed

+46
-44
lines changed

1 file changed

+46
-44
lines changed

fetch.bs

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,8 +1981,8 @@ not always relevant and might require different behavior.
19811981
"<code>client</code>".
19821982

19831983
<p>A <a for=/>request</a> has an associated
1984-
<dfn export for=request>top-level navigation initiator origin</dfn>,
1985-
which is an <a for=/>origin</a> or null. Unless stated otherwise it is null.
1984+
<dfn export for=request>top-level navigation initiator origin</dfn>, which is an <a for=/>origin</a>
1985+
or null. Unless stated otherwise it is null.
19861986

19871987
<p class=note>"<code>client</code>" is changed to an <a for=/>origin</a> during
19881988
<a lt=fetch for=/>fetching</a>. It provides a convenient way for standards to not have to set
@@ -2301,7 +2301,7 @@ or "<code>object</code>".
23012301
not <a>same origin</a> with <var>lastURL</var>'s <a for=url>origin</a>, then set
23022302
<var>computedTaint</var> to "<code>same-site</code>".
23032303

2304-
<li>Set <var>lastURL</var> to <var>url</var>.
2304+
<li><p>Set <var>lastURL</var> to <var>url</var>.
23052305
</ol>
23062306

23072307
<li><p>Return <var>computedTaint</var>.
@@ -4286,25 +4286,25 @@ prefetch, or to treat it differently when counting page visits.
42864286

42874287
<h2 id=cookies>Cookies</h2>
42884288

4289-
<h3 id=cookie-header>`<code>Cookie</code>` header</h3>
4289+
<p>The `<code>Cookie</code>` request header and `<code>Set-Cookie</code>` response headers are
4290+
largely defined in their own specifications. We define additional infrastructure to be able to use
4291+
them conveniently here. [[COOKIES]].
4292+
42904293

4291-
<p>The `<code>Cookie</code>` header is largely defined in its own specification. We define
4292-
additional infrastructure to be able to use them conveniently here. [[COOKIES]].
4294+
<h3 id=cookie-header>`<code>Cookie</code>` header</h3>
42934295

42944296
<div algorithm>
4295-
<p>To <dfn>append a request `<code>Cookie</code>` header</dfn>,
4296-
given a <a for=/>request</a> <var>request</var>:
4297+
<p>To <dfn>append a request `<code>Cookie</code>` header</dfn>, given a <a for=/>request</a>
4298+
<var>request</var>:
42974299

42984300
<ol>
42994301
<li><p>If the user agent is configured to disable cookies for <var>request</var>, then it should
43004302
return.
43014303

43024304
<li><p>Let |sameSite| be the result of [=determining the same-site mode=] for <var>request</var>.
43034305

4304-
<li><p>Let |isSecure| be false.
4305-
4306-
<li><p>If <var>request</var>'s <a for=request>client</a> is a <a>secure context</a>, then set
4307-
|isSecure| to true.
4306+
<li><p>Let |isSecure| be true if <var>request</var>'s <a for=request>current URL</a>'s
4307+
<a for=url>scheme</a> is "<code>https</code>"; otherwise false.
43084308

43094309
<li>
43104310
<p>Let |httpOnlyAllowed| be true.
@@ -4328,21 +4328,21 @@ given a <a for=/>request</a> <var>request</var>:
43284328
</ol>
43294329
</div>
43304330

4331+
4332+
<h3 id=set-cookie-header>`<code>Set-Cookie</code>` header</h3>
4333+
43314334
<div algorithm>
4332-
<p>To
4333-
<dfn>parse and store response `<code>Set-Cookie</code>` headers</dfn>,
4334-
given a <a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var>response</var>:
4335+
<p>To <dfn>parse and store response `<code>Set-Cookie</code>` headers</dfn>, given a
4336+
<a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var>response</var>:
43354337

43364338
<ol>
4337-
<li><p>If the user agent is configured to disable cookies for <var>request</var>,
4338-
then it should return.
4339+
<li><p>If the user agent is configured to disable cookies for <var>request</var>, then it should
4340+
return.
43394341

43404342
<li><p>Let |allowNonHostOnlyCookieForPublicSuffix| be false.
43414343

4342-
<li><p>Let |isSecure| be false.
4343-
4344-
<li><p>If <var>request</var>'s <a for=request>current URL</a>'s <a for=url>scheme</a> is
4345-
"<code>https</code>", then set |isSecure| to true.
4344+
<li><p>Let |isSecure| be true if <var>request</var>'s <a for=request>current URL</a>'s
4345+
<a for=url>scheme</a> is "<code>https</code>"; otherwise false.
43464346

43474347
<li>
43484348
<p>Let |httpOnlyAllowed| be true.
@@ -4351,30 +4351,32 @@ given a <a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var
43514351
<code>document.cookie</code> getter steps for instance.
43524352

43534353
<li><p>Let |sameSiteStrictOrLaxAllowed| be true if the result of [=determine the same-site mode=]
4354-
for |request| is "<code>StrictOrLess</code>", and false otherwise.
4354+
for |request| is "<code>strict-or-less</code>"; otherwise false.
43554355

4356-
<li><p><a for=list>For each</a> <var>header</var> of <var>response</var>'s
4357-
<a for=response>header list</a>:
4356+
<li>
4357+
<p><a for=list>For each</a> <var>header</var> of <var>response</var>'s
4358+
<a for=response>header list</a>:
43584359

4359-
<ol>
4360-
<li><p>If <var>header</var>'s <a for=header>name</a> is not a <a>byte-case-insensitive</a> match
4361-
for `<code>Set-Cookie</code>`, <a for=iteration>continue</a>.
4360+
<ol>
4361+
<li><p>If <var>header</var>'s <a for=header>name</a> is not a <a>byte-case-insensitive</a> match
4362+
for `<code>Set-Cookie</code>`, then <a for=iteration>continue</a>.
43624363

4363-
<li><p><a>Parse and store a cookie</a> given <var>header</var>'s <a for=header>value</a>,
4364-
|isSecure|, <var>request</var>'s <a for=request>current URL</a>'s <a for=url>host</a>,
4365-
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>path</a>, |httpOnlyAllowed|,
4366-
|allowNonHostOnlyCookieForPublicSuffix|, and |sameSiteStrictOrLaxAllowed|.
4364+
<li><p><a>Parse and store a cookie</a> given <var>header</var>'s <a for=header>value</a>,
4365+
|isSecure|, <var>request</var>'s <a for=request>current URL</a>'s <a for=url>host</a>,
4366+
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>path</a>, |httpOnlyAllowed|,
4367+
|allowNonHostOnlyCookieForPublicSuffix|, and |sameSiteStrictOrLaxAllowed|.
43674368

4368-
<li><p><a>Garbage collect cookies</a> given <var>request</var>'s
4369-
<a for=request>current URL</a>'s <a for=url>host</a>.
4370-
</ol>
4369+
<li><p><a>Garbage collect cookies</a> given <var>request</var>'s <a for=request>current URL</a>'s
4370+
<a for=url>host</a>.
4371+
</ol>
4372+
4373+
<p class=note>As noted elsewhere the `<code>Set-Cookie</code>` header cannot be combined and
4374+
therefore each occurrence is processed independently. This is not allowed for any other header.
43714375
</ol>
43724376
</div>
43734377

4374-
<h3 id=cookie-infrastructure>Cookie infrastructure</h3>
43754378

4376-
<p>These algorithms are not only for use with the `<code>Cookie</code>` header, and are used in
4377-
other specifications.
4379+
<h3 id=cookie-infrastructure>Cookie infrastructure</h3>
43784380

43794381
<div algorithm>
43804382
<p>To <dfn>determine the same-site mode</dfn> for a given <a for=/>request</a> <var>request</var>:
@@ -4384,20 +4386,20 @@ other specifications.
43844386
or "<code>POST</code>".
43854387

43864388
<li><p>If <var>request</var>'s <a for=request>top-level navigation initiator origin</a> is not
4387-
null and is not <a for=/>same site</a> to <var>request</var>'s <a for=request>URL</a>'s
4388-
<a for=url>origin</a>, then return "<code>UnsetOrLess</code>".
4389+
null and is not <a for=/>same site</a> with <var>request</var>'s <a for=request>URL</a>'s
4390+
<a for=url>origin</a>, then return "<code>unset-or-less</code>".
43894391

43904392
<li><p>If <var>request</var>'s <a for=request>method</a> is "<code>GET</code>" and
43914393
<var>request</var>'s <a for=request>destination</a> is "document", then return
4392-
"<code>LaxOrLess</code>".
4394+
"<code>lax-or-less</code>".
43934395

43944396
<li><p>If <var>request</var>'s <a for=request>client</a>'s
4395-
<a for=environment>has cross-site ancestor</a> is true then return "<code>UnsetOrLess</code>".
4397+
<a for=environment>has cross-site ancestor</a> is true, then return "<code>unset-or-less</code>".
43964398

4397-
<li><p>If <var>request</var>'s <a for=request>redirect-taint</a> is "<code>cross-site</code>",
4398-
then return "<code>UnsetOrLess</code>".
4399+
<li><p>If <var>request</var>'s <a for=request>redirect-taint</a> is "<code>cross-site</code>", then
4400+
return "<code>unset-or-less</code>".
43994401

4400-
<li><p>Return "<code>StrictOrLess</code>".
4402+
<li><p>Return "<code>strict-or-less</code>".
44014403
</ol>
44024404
</div>
44034405

0 commit comments

Comments
 (0)