-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #12314 Fixes: #8057 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs/node#12314 Fixes: nodejs/node#8057 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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