Skip to content

Commit 320d88a

Browse files
committed
nits and some minor errors
1 parent 48f6356 commit 320d88a

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
@@ -1958,8 +1958,8 @@ not always relevant and might require different behavior.
19581958
"<code>client</code>".
19591959

19601960
<p>A <a for=/>request</a> has an associated
1961-
<dfn export for=request>top-level navigation initiator origin</dfn>,
1962-
which is an <a for=/>origin</a> or null. Unless stated otherwise it is null.
1961+
<dfn export for=request>top-level navigation initiator origin</dfn>, which is an <a for=/>origin</a>
1962+
or null. Unless stated otherwise it is null.
19631963

19641964
<p class=note>"<code>client</code>" is changed to an <a for=/>origin</a> during
19651965
<a lt=fetch for=/>fetching</a>. It provides a convenient way for standards to not have to set
@@ -2278,7 +2278,7 @@ or "<code>object</code>".
22782278
not <a>same origin</a> with <var>lastURL</var>'s <a for=url>origin</a>, then set
22792279
<var>computedTaint</var> to "<code>same-site</code>".
22802280

2281-
<li>Set <var>lastURL</var> to <var>url</var>.
2281+
<li><p>Set <var>lastURL</var> to <var>url</var>.
22822282
</ol>
22832283

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

42624262
<h2 id=cookies>Cookies</h2>
42634263

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

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

42694271
<div algorithm>
4270-
<p>To <dfn>append a request `<code>Cookie</code>` header</dfn>,
4271-
given a <a for=/>request</a> <var>request</var>:
4272+
<p>To <dfn>append a request `<code>Cookie</code>` header</dfn>, given a <a for=/>request</a>
4273+
<var>request</var>:
42724274

42734275
<ol>
42744276
<li><p>If the user agent is configured to disable cookies for <var>request</var>, then it should
42754277
return.
42764278

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

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

42844284
<li>
42854285
<p>Let |httpOnlyAllowed| be true.
@@ -4303,21 +4303,21 @@ given a <a for=/>request</a> <var>request</var>:
43034303
</ol>
43044304
</div>
43054305

4306+
4307+
<h3 id=set-cookie-header>`<code>Set-Cookie</code>` header</h3>
4308+
43064309
<div algorithm>
4307-
<p>To
4308-
<dfn>parse and store response `<code>Set-Cookie</code>` headers</dfn>,
4309-
given a <a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var>response</var>:
4310+
<p>To <dfn>parse and store response `<code>Set-Cookie</code>` headers</dfn>, given a
4311+
<a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var>response</var>:
43104312

43114313
<ol>
4312-
<li><p>If the user agent is configured to disable cookies for <var>request</var>,
4313-
then it should return.
4314+
<li><p>If the user agent is configured to disable cookies for <var>request</var>, then it should
4315+
return.
43144316

43154317
<li><p>Let |allowNonHostOnlyCookieForPublicSuffix| be false.
43164318

4317-
<li><p>Let |isSecure| be false.
4318-
4319-
<li><p>If <var>request</var>'s <a for=request>current URL</a>'s <a for=url>scheme</a> is
4320-
"<code>https</code>", then set |isSecure| to true.
4319+
<li><p>Let |isSecure| be true if <var>request</var>'s <a for=request>current URL</a>'s
4320+
<a for=url>scheme</a> is "<code>https</code>"; otherwise false.
43214321

43224322
<li>
43234323
<p>Let |httpOnlyAllowed| be true.
@@ -4326,30 +4326,32 @@ given a <a for=/>request</a> <var>request</var> and a <a for=/>response</a> <var
43264326
<code>document.cookie</code> getter steps for instance.
43274327

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

4331-
<li><p><a for=list>For each</a> <var>header</var> of <var>response</var>'s
4332-
<a for=response>header list</a>:
4331+
<li>
4332+
<p><a for=list>For each</a> <var>header</var> of <var>response</var>'s
4333+
<a for=response>header list</a>:
43334334

4334-
<ol>
4335-
<li><p>If <var>header</var>'s <a for=header>name</a> is not a <a>byte-case-insensitive</a> match
4336-
for `<code>Set-Cookie</code>`, <a for=iteration>continue</a>.
4335+
<ol>
4336+
<li><p>If <var>header</var>'s <a for=header>name</a> is not a <a>byte-case-insensitive</a> match
4337+
for `<code>Set-Cookie</code>`, then <a for=iteration>continue</a>.
43374338

4338-
<li><p><a>Parse and store a cookie</a> given <var>header</var>'s <a for=header>value</a>,
4339-
|isSecure|, <var>request</var>'s <a for=request>current URL</a>'s <a for=url>host</a>,
4340-
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>path</a>, |httpOnlyAllowed|,
4341-
|allowNonHostOnlyCookieForPublicSuffix|, and |sameSiteStrictOrLaxAllowed|.
4339+
<li><p><a>Parse and store a cookie</a> given <var>header</var>'s <a for=header>value</a>,
4340+
|isSecure|, <var>request</var>'s <a for=request>current URL</a>'s <a for=url>host</a>,
4341+
<var>request</var>'s <a for=request>current URL</a>'s <a for=url>path</a>, |httpOnlyAllowed|,
4342+
|allowNonHostOnlyCookieForPublicSuffix|, and |sameSiteStrictOrLaxAllowed|.
43424343

4343-
<li><p><a>Garbage collect cookies</a> given <var>request</var>'s
4344-
<a for=request>current URL</a>'s <a for=url>host</a>.
4345-
</ol>
4344+
<li><p><a>Garbage collect cookies</a> given <var>request</var>'s <a for=request>current URL</a>'s
4345+
<a for=url>host</a>.
4346+
</ol>
4347+
4348+
<p class=note>As noted elsewhere the `<code>Set-Cookie</code>` header cannot be combined and
4349+
therefore each occurrence is processed independently. This is not allowed for any other header.
43464350
</ol>
43474351
</div>
43484352

4349-
<h3 id=cookie-infrastructure>Cookie infrastructure</h3>
43504353

4351-
<p>These algorithms are not only for use with the `<code>Cookie</code>` header, and are used in
4352-
other specifications.
4354+
<h3 id=cookie-infrastructure>Cookie infrastructure</h3>
43534355

43544356
<div algorithm>
43554357
<p>To <dfn>determine the same-site mode</dfn> for a given <a for=/>request</a> <var>request</var>:
@@ -4359,20 +4361,20 @@ other specifications.
43594361
or "<code>POST</code>".
43604362

43614363
<li><p>If <var>request</var>'s <a for=request>top-level navigation initiator origin</a> is not
4362-
null and is not <a for=/>same site</a> to <var>request</var>'s <a for=request>URL</a>'s
4363-
<a for=url>origin</a>, then return "<code>UnsetOrLess</code>".
4364+
null and is not <a for=/>same site</a> with <var>request</var>'s <a for=request>URL</a>'s
4365+
<a for=url>origin</a>, then return "<code>unset-or-less</code>".
43644366

43654367
<li><p>If <var>request</var>'s <a for=request>method</a> is "<code>GET</code>" and
43664368
<var>request</var>'s <a for=request>destination</a> is "document", then return
4367-
"<code>LaxOrLess</code>".
4369+
"<code>lax-or-less</code>".
43684370

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

4372-
<li><p>If <var>request</var>'s <a for=request>redirect-taint</a> is "<code>cross-site</code>",
4373-
then return "<code>UnsetOrLess</code>".
4374+
<li><p>If <var>request</var>'s <a for=request>redirect-taint</a> is "<code>cross-site</code>", then
4375+
return "<code>unset-or-less</code>".
43744376

4375-
<li><p>Return "<code>StrictOrLess</code>".
4377+
<li><p>Return "<code>strict-or-less</code>".
43764378
</ol>
43774379
</div>
43784380

0 commit comments

Comments
 (0)