Skip to content

Define header value inline #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -373,21 +373,24 @@ a <a for=/>header list</a> (<var>list</var>), run these steps:
<p>A <dfn export id=concept-header>header</dfn> consists of a
<dfn export for=header id=concept-header-name>name</dfn> and
<dfn export for=header id=concept-header-value>value</dfn>.
A <a for=header>name</a> is a
<a>case-insensitive byte sequence</a> that matches the
<a spec=http>field-name</a> token production. A
<a for=header>value</a> is a byte sequence that matches the
<a spec=http>field-content</a> token production.

<p class=XXX>The definition of <a for=header>value</a>
<a href=https://github.com/whatwg/fetch/issues/332>needs serious work</a>.
<p>A <a for=header>name</a> is a <a>case-insensitive byte sequence</a> that matches the
<a spec=http>field-name</a> token production.

<p class="note no-backref"><a spec=http>field-value</a> allows 0x0A and
0x0D bytes which can lead to reparsing issues.
<p>A <a for=header>value</a> is a <a>byte sequence</a> that matches the following conditions:

<ul class=brief>
<li><p>Has no leading or trailing <a>HTTP whitespace bytes</a>.
<li><p>Contains no 0x00, 0x0A or 0x0D bytes.
</ul>

<p class=note>The definition of <a for=header>value</a> is not defined in terms of an HTTP token
production as
<a href=https://github.com/httpwg/http11bis/issues/19 title="fix field-value ABNF">it is broken</a>.

<p>To <dfn export for=header id=concept-header-value-normalize>normalize</dfn> a
<a for=header>value</a>, remove any leading and trailing
<a>HTTP whitespace bytes</a> from it.
<var>potentialValue</var>, remove any leading and trailing <a>HTTP whitespace bytes</a> from
<var>potentialValue</var>.

<p>A <dfn export for=header id=concept-header-value-combined>combined value</dfn>,
given a <a for=header>name</a> (<var>name</var>) and
Expand Down