Skip to content

Commit

Permalink
HTTP Trailer and Transfer-Encoding headers to General (#4898)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee authored May 11, 2021
1 parent 35c8be5 commit 306b354
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion files/en-us/glossary/general_header/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- Glossary
- WebMechanics
---
<p>A <strong>general header</strong> is an {{glossary('Header', 'HTTP header')}} that can be used in both request and response messages but doesn't apply to the content itself. Depending on the context they are used in, general headers are either {{glossary("Response header", "response")}} or {{glossary("request header", "request headers")}} (e.g. {{HTTPheader("Cache-Control")}}).</p>
<p>A <strong>general header</strong> is an {{glossary('HTTP_header', 'HTTP header')}} that can be used in both request and response messages but doesn't apply to the content itself. Depending on the context they are used in, general headers are either {{glossary("Response header", "response")}} or {{glossary("request header", "request headers")}} (e.g. {{HTTPheader("Cache-Control")}}).</p>

<div class="notecard note">
<p>Current versions of the HTTP/1.1 specification do not specifically categorize headers as "general headers". Historically the general headers did not include headers that describe the payload ({{glossary("entity header", "entity headers")}}).</p>
Expand Down
12 changes: 6 additions & 6 deletions files/en-us/web/http/headers/trailer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
dynamically generated while the message body is sent, such as a message integrity check,
digital signature, or post-processing status.</p>

<div class="note">
<div class="notecard note">
<h4>Note</h4>
<p>The {{HTTPHeader("TE")}} request header needs to be set to "trailers" to allow
trailer fields.</p>
</div>
Expand All @@ -22,7 +23,7 @@
<tbody>
<tr>
<th scope="row">Header type</th>
<td>{{Glossary("Response header")}}</td>
<td>{{Glossary("General header")}}</td>
</tr>
<tr>
<th scope="row">{{Glossary("Forbidden header name")}}</th>
Expand Down Expand Up @@ -102,8 +103,8 @@ <h2 id="Specifications">Specifications</h2>
<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">The compatibility table in this page is generated from structured data.
If you'd like to contribute to the data, please check out <a
href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>
If you'd like to contribute to the data, please check out
<a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>
and send us a pull request.</p>

<p>{{Compat("http.headers.Trailer")}}</p>
Expand All @@ -114,7 +115,6 @@ <h2 id="See_also">See also</h2>
<li>{{HTTPHeader("Transfer-Encoding")}}</li>
<li>{{HTTPHeader("TE")}}</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Chunked_transfer_encoding">Chunked transfer
encoding</a></p>
<p><a href="https://en.wikipedia.org/wiki/Chunked_transfer_encoding">Chunked transfer encoding</a></p>
</li>
</ul>
17 changes: 10 additions & 7 deletions files/en-us/web/http/headers/transfer-encoding/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
encoding used to safely transfer the {{Glossary("Payload body","payload body")}} to the
user.</p>

<div class="note"><a href="https://wikipedia.org/wiki/HTTP/2">HTTP/2</a> doesn't support
HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient,
mechanisms for data streaming.</div>
<div class="notecard note">
<h4>Note</h4>
<p><a href="https://wikipedia.org/wiki/HTTP/2">HTTP/2</a> doesn't support
HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient,
mechanisms for data streaming.</p>
</div>

<p><code>Transfer-Encoding</code> is a <a
href="/en-US/docs/Web/HTTP/Headers#hbh">hop-by-hop header</a>, that is applied to a
Expand All @@ -31,7 +34,7 @@
<tbody>
<tr>
<th scope="row">Header type</th>
<td>{{Glossary("Response header")}}</td>
<td>{{Glossary("General header")}}</td>
</tr>
<tr>
<th scope="row">{{Glossary("Forbidden header name")}}</th>
Expand Down Expand Up @@ -62,17 +65,17 @@ <h2 id="Directives">Directives</h2>
regular chunk, with the exception that its length is zero. It is followed by the
trailer, which consists of a (possibly empty) sequence of entity header fields.</dd>
<dt><code>compress</code></dt>
<dd>A format using the <a href="https://en.wikipedia.org/wiki/LZW">Lempel-Ziv-Welch</a> (LZW) algorithm. The
<dd>A format using the <a href="https://en.wikipedia.org/wiki/LZW">Lempel-Ziv-Welch</a> (LZW) algorithm. The
value name was taken from the UNIX <em>compress</em> program, which implemented this
algorithm.<br>
Like the compress program, which has disappeared from most UNIX distributions, this
content-encoding is used by almost no browsers today, partly because of a patent issue
(which expired in 2003).</dd>
<dt><code>deflate</code></dt>
<dd>Using the <a href="https://en.wikipedia.org/wiki/Zlib">zlib</a>
structure (defined in <a href="https://datatracker.ietf.org/doc/html/rfc1950">RFC 1950</a>), with the <a
structure (defined in <a href="https://datatracker.ietf.org/doc/html/rfc1950">RFC 1950</a>), with the <a
href="https://en.wikipedia.org/wiki/DEFLATE"><em>deflate</em></a>
compression algorithm (defined in <a href="https://datatracker.ietf.org/doc/html/rfc1952">RFC 1951</a>).</dd>
compression algorithm (defined in <a href="https://datatracker.ietf.org/doc/html/rfc1952">RFC 1951</a>).</dd>
<dt><code>gzip</code></dt>
<dd>A format using the <a href="https://en.wikipedia.org/wiki/LZ77_and_LZ78#LZ77">Lempel-Ziv coding</a>
(LZ77), with a 32-bit CRC. This is originally the format of the UNIX <em>gzip</em>
Expand Down

0 comments on commit 306b354

Please sign in to comment.