-
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): Refresh headers docs (d-k) #36075
base: main
Are you sure you want to change the base?
Conversation
This pull request has merge conflicts that must be resolved before it can be merged. |
@@ -7,12 +7,10 @@ browser-compat: http.headers.Date | |||
|
|||
{{HTTPSidebar}} | |||
|
|||
The **`Date`** general HTTP header contains the date and time | |||
at which the message originated. | |||
The HTTP **`Date`** header contains the date and time at which the message originated. |
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.
This form is used in some places. Up to you. I like the consistency.
The HTTP **`Date`** header contains the date and time at which the message originated. | |
The HTTP **`Date`** {{Glossary("Request header","request")}} and {{Glossary("Response header","response")}} header contains the date and time at which the message originated. |
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.
I was in two minds about this, my reasoning was it's either "requests only" or "responses only" (or a more granular classification), otherwise it's "a header" when it can be either, so I'm leaning towards leaving these out in those cases, what do you think?
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.
Actually here's one that landed recently: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-WebSocket-Version
So let's go with this convention 👍🏻
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.
I like the convention because you're explicitly saying if it can be a request, response, or both. Without mentioning both, you could have just forgotten to add the information. Tiny bit better for reader.
@@ -15,10 +15,11 @@ browser-compat: http.headers.Digest | |||
> Use {{HTTPHeader("Content-Digest")}} instead. | |||
> For `id-*` digest algorithms, use {{HTTPHeader("Repr-Digest")}}. | |||
|
|||
The **`Digest`** response or request HTTP header provides the other side with a {{Glossary("digest")}} of the {{HTTPHeader("Content-Encoding")}}-encoded _selected representation_. It can be requested by using the {{HTTPHeader("Want-Digest")}} header. | |||
The HTTP **`Digest`** header provides the recipient with a {{Glossary("digest")}} of the {{HTTPHeader("Content-Encoding")}}-encoded _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.
Again, I like this form ...
The HTTP **`Digest`** header provides the recipient with a {{Glossary("digest")}} of the {{HTTPHeader("Content-Encoding")}}-encoded _selected representation_. | |
The HTTP **`Digest`** {{Glossary("Request header","request")}} and {{Glossary("Response header","response")}} header provides the recipient with a {{Glossary("digest")}} of the {{HTTPHeader("Content-Encoding")}}-encoded _selected representation_. |
@@ -7,12 +7,10 @@ browser-compat: http.headers.Date | |||
|
|||
{{HTTPSidebar}} | |||
|
|||
The **`Date`** general HTTP header contains the date and time | |||
at which the message originated. |
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.
PS Also check https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/HTTP_header_page_template to make sure it matches all this work you are doing!
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.
Note that the change you have made puts all the content up the top. I am happy with that, but in some case we might have too much information. So for the template I'd suggest that if the intro goes over the fold the author is allowed to add a separate section "Description" after the directive and before the direction, moving most of the content to that section.
That somewhat mirrors what Web APIs do.
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.
add a separate section "Description" after the directive and before the direction
I don't follow this one 😄, where do you think "Description" should go?
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 in Web APIs this appears after syntax sections, before Examples. The template hints that you have a short introductory sentence and then all the detail in the description. I don't particularly like that and try to avoid a description section if I can keep the text up the top succint.
So this pattern for HTTP would be:
Open to discussion. We don't have to do this, we just need to make sure that all this work you're doing is captured.
|
||
Servers that opt in to the `DPR` client hint will typically also specify it in the {{HTTPHeader("Vary")}} header to inform caches that the server may send different responses based on the header value in a request. | ||
|
||
> [!WARNING] |
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.
I wonder if this warning should perhaps live up the top with the other headers?
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.
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.
Absolutely correct. I don't think that matters because this is deprecated and we don't really want people to read it anyway :-).
That said, hopefully Ruth will eventually get the proposal for banners sorted out and implemented.
The **`Early-Data`** header is set by | ||
an intermediary to indicate that the request has been conveyed in [TLS early data](/en-US/docs/Web/Security/Transport_Layer_Security#tls_1.3), | ||
and also indicates that the intermediary understands the {{HTTPStatus("425", "425 Too Early")}} status code. | ||
The HTTP **`Early-Data`** {{Glossary("request header")}} is set by an intermediary to indicate that the request has been conveyed in [TLS early data](/en-US/docs/Web/Security/Transport_Layer_Security#tls_1.3), and also indicates that the intermediary understands the {{HTTPStatus("425", "425 Too Early")}} status code. |
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.
FWIW I don't really "get" this, but I am pretty sure that it doesn't matter - this is sufficient for most readers.
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.
Maybe we can add some details to this page: https://aws.github.io/s2n-tls/usage-guide/ch14-early-data.html
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.
I also noticed there's no See also section here
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.
OK. I don't feel very strongly either way. It feels like the kind of thing only a deep dark expert would need, and they would read the spec.
Co-authored-by: Hamish Willee <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hamish Willee <[email protected]>
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.
Missing a See also section on this page
Description
This PR refreshes a few HTTP headers pages.
common changes:
The HTTP **`Header-Name`** (request|response) header
in first sentence{{HTTPStatus("406", "406 Not Acceptable")}}
Motivation
Keeping content up-to-date, fixing formatting, unifying writing conventions
Related pull requests: