-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Glossary: deprecate "Payload Body" per RFC 9110 #37598
Open
crossaw
wants to merge
4
commits into
mdn:main
Choose a base branch
from
crossaw:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3
−27
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,32 +6,8 @@ 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! | ||||||||||||||
Prior to June 2022, the **payload body** or **payload** was the resource representation being transferred in an HTTP 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 the same thing. Representation data could also be transferred in the HTTP Header, but such data would not be regarded as "payload". | ||||||||||||||
|
||||||||||||||
For example, in this response the message body contains only the payload body: "Mozilla Developer Network": | ||||||||||||||
With the release of 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 | ||||||||||||||
|
||||||||||||||
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). | ||||||||||||||
For more information see [RFC 7230, section 3.3: Message Body](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3), [RFC 7231, section 3: Representations](https://datatracker.ietf.org/doc/html/rfc7231#section-3), and [RFC 9110, appendix B.3: Changes from RFC 7231](https://datatracker.ietf.org/doc/html/rfc9110#name-changes-from-rfc-7231). | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use a See also section like the other entry:
Suggested change
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.