-
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
chore(http): Delete "Digest" and "Want-Digest", improve digest pages #36879
base: main
Are you sure you want to change the base?
Conversation
The HTTP **`Content-Digest`** header provides a {{Glossary("digest")}} of the message content in an HTTP message. | ||
As such, `Content-Digest` is dependent on among other things {{HTTPHeader("Content-Encoding")}} and {{HTTPHeader("Content-Range")}}, but not dependent on, for example, HTTP/1.1's {{HTTPHeader("Transfer-Encoding")}}. | ||
`Content-Digest` may coincide with {{HTTPHeader("Repr-Digest")}} if a representation was sent in a single message. | ||
The HTTP **`Content-Digest`** {{Glossary("request header", "request")}} and {{Glossary("response header")}} provides a {{Glossary("digest")}} calculated using a hashing algorithm applied to the message content. |
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.
Not going to block merging, but given this is request and response, perhaps we should have an example or explanation of the case where the browser sends a digest?
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.
Ditto for Repr
```plain | ||
Content-Digest: unixcksum=916142062 | ||
Content-Digest: md5=:+thA//8pGVGk2VYuJkFNvA==:, unixsum=26869 | ||
### Client requests a SHA-256 Content-Digest |
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.
Client? User-Agent, Browser?
|
||
### Identical Content-Digest and Repr-Digest values | ||
|
||
A client requests a resource without a `Want-Content-Digest` field: |
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.
For client, I prefer browser if it is always a browser, and user-agent if it could reasonably mean a script. Obviously if you agree, change everywhere.
``` | ||
|
||
In this case, the server is configured to send unsolicited digest headers in responses. | ||
Both the `Repr-Digest` and `Content-Digest` fields have matching values: |
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.
Perhaps
Both the `Repr-Digest` and `Content-Digest` fields have matching values: | |
The `Repr-Digest` and `Content-Digest` fields have matching values because they are using the same algorithm, and in this case the whole resource is sent in just one message. |
@@ -8,12 +8,14 @@ spec-urls: https://datatracker.ietf.org/doc/html/rfc9530 | |||
{{HTTPSidebar}} | |||
|
|||
The HTTP **`Repr-Digest`** {{Glossary("Request header", "request")}} and {{Glossary("Response header", "response header")}} provides a {{Glossary("digest")}} of the selected representation of the target resource. | |||
A `Repr-Digest` is most suited to validate the integrity of partial or multipart messages against the full selected representation. |
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.
So, I wanted to change it like this:
A `Repr-Digest` is most suited to validate the integrity of partial or multipart messages against the full selected representation. | |
A `Repr-Digest` can be used to validate the integrity of partial or multipart messages against the full selected representation. |
Now I'd like you to tell me what that means ? :-). How can you validate a partial message using this information. The answer is probably you can't. My take is that this is only really useful once you have the whole message, and then it tells you that all the parts were OK.
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.
Looks pretty good. Was tempted to merge, but perhaps worth leaving open for you to see if you want to address any of the comments.
Description
This PR removes the Digest and Want-Digest pages which are deprecated. They are also confusing, given the pages are mixed in with newer alternatives. I'm proposing we redirect to content-related digest headers.
Deletions:
Digest
header, redirected toContent-Digest
Want-Digest
header, redirected toWant-Content-Digest
Changes:
Repr-Digest
andContent-Digest
pages for clarityspec_urls
front matter should bespec-urls
Additions:
Content-Digest
based on specsMotivation
The remaining pages were touched recently, but I think there's room for improvement in the language used so that it's easier to understand when/why to use
Repr-Digest
instead ofContent-Digest
.Related issues and pull requests