Skip to content

Commit

Permalink
Glossary: deprecate "Payload Body" per RFC 9110 (#37598)
Browse files Browse the repository at this point in the history
* Rewrite index.md to deprecate "Payload Body" per RFC 9110

The entry for "HTTP Content" now contains the details formerly described here.  This rewrite makes this entry something of a historical record, which is useful since people will likely be using the word "payload" in its former context for many years.

* Change sentence spacing

The bot changed my double spaces to single spaces after periods.  That's fine.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Correct link format

The bot turned my absolute link into a relative link.  I should have done that myself.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Brian Smith <[email protected]>
  • Loading branch information
3 people authored Feb 3, 2025
1 parent e80499f commit 35fbd84
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions files/en-us/glossary/payload_body/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,12 @@ page-type: glossary-definition

{{GlossarySidebar}}

The HTTP message **payload body** is the _information_ ("payload") part of the data that is sent in the HTTP Message Body (if any), prior to [transfer encoding](/en-US/docs/Web/HTTP/Headers/Transfer-Encoding) being applied. If transfer encoding is not used, the _payload body_ and _message body_ are the same!
In HTTP messages, the **payload body** or **payload** was the resource representation transferred in a message body, stripped of any [transfer encoding](/en-US/docs/Web/HTTP/Headers/Transfer-Encoding). With no transfer encoding, the _payload body_ and _message body_ are identical. Representation data could also be transferred in HTTP headers, but such data would not be considered a "payload".

For example, in this response the message body contains only the payload body: "Mozilla Developer Network":
Since {{RFC("9110")}}, the word **content** replaces the word **payload**. See [**HTTP content**](/en-US/docs/Glossary/HTTP_Content).

```http
HTTP/1.1 200 OK
Content-Type: text/plain
## See also

Mozilla Developer Network
```

By contrast, the below response uses _transfer encoding_ to encode the payload body into chunks. The payload body (information) sent is still "Mozilla Developer Network", but the message body includes additional data to separate the chunks:

```http
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
7\r\n
Mozilla\r\n
9\r\n
Developer\r\n
7\r\n
Network\r\n
0\r\n
\r\n
```

For more information see [RFC 7230, section 3.3: Message Body](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3) and [RFC 7230, section 3.3.1: Transfer-Encoding](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).
- {{Glossary("Content header")}}
- [RFC 9110, section 6.4: Content](https://httpwg.org/specs/rfc9110.html#rfc.section.6.4) (obsoletes [RFC 7231](https://datatracker.ietf.org/doc/html/rfc7231#section-3.3) Payload Semantics)
- [Changes from RFC 7231](https://httpwg.org/specs/rfc9110.html#changes.from.rfc.7231)

0 comments on commit 35fbd84

Please sign in to comment.