-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
doc: response.write ignores body in some cases #12314
Conversation
It definitely is. :) |
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.
LGTM. Left a bunch of nits. If you can address them, great. If not, maybe the person landing this PR can. And if not, then someone can do it as an easy subsequent PR. Whatever, everyone wins!
doc/api/http.md
Outdated
@@ -1161,6 +1161,9 @@ it will switch to implicit header mode and flush the implicit headers. | |||
This sends a chunk of the response body. This method may | |||
be called multiple times to provide successive parts of the body. | |||
|
|||
Note that in `http` module, the response body is omitted when the request is a |
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.
Nit: Add "the":
in the
http
module
doc/api/http.md
Outdated
@@ -1161,6 +1161,9 @@ it will switch to implicit header mode and flush the implicit headers. | |||
This sends a chunk of the response body. This method may | |||
be called multiple times to provide successive parts of the body. | |||
|
|||
Note that in `http` module, the response body is omitted when the request is a | |||
HEAD. Similarly, The `204` and `304` responses MUST NOT include a message body. |
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.
Nit: HEAD
-> HEAD request
(Yeah, it's repetitive, but I think that clarity is warranted here and not particularly awkward.)
Nit: The
-> the
Nit: I don't think we do ALL CAPS for emphasis in the docs. MUST NOT
-> to _must not_
which will render as italics.
7560327
to
734a8d9
Compare
@Trott thank you for the feedback. Pushed new changes. |
LGTM |
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs/node#12314 Fixes: nodejs/node#8057 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #8057
Hi guys. I hope it is ok to take a stalled PR (#8992) and finally close the issue.
Please feel free to close it, if it is something wrong.
What is done here, is updated doc for
http
andresponse.write
in particular with information thatbody
is ignored in case of HEAD request.Checklist
Affected core subsystem(s)
doc, http