Skip to content

Conversation

@ikasumiwt
Copy link
Contributor

@ikasumiwt ikasumiwt commented Mar 21, 2018

Fixed response.end() to request.end() at request.socket because request.socket property was null when called after request.end() method.

Checklist

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem. labels Mar 21, 2018
doc/api/http.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both seem incorrect. It's null when ClientRequest is instantiated via http.request() because a socket has not been assigned yet but it seems the property is never nulled after the 'socket' event.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @lpinca. It also seems something we might want to do (nulling the socket) not after request.end() but rather after the response has been fully consumed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm... actually good point. Missed that on my initial read through

@BridgeAR
Copy link
Member

BridgeAR commented Apr 9, 2018

@nodejs/http @nodejs/http2 @nodejs/streams PTAL

jasnell
jasnell previously approved these changes Apr 9, 2018
Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making my -1 explicit to prevent this from being landed as this change doesn't seem correct.

@shigeki
Copy link
Contributor

shigeki commented Apr 9, 2018

Removing the sentence of response.end() seems to get a right correction.
@ikasumiwt Can you change this?

@jasnell jasnell dismissed their stale review April 10, 2018 15:37

agreeing with mcollina and lpinca

@ikasumiwt ikasumiwt force-pushed the feature/fix-request-socket-doc branch from 9c42196 to d9ce804 Compare April 12, 2018 16:32
@ikasumiwt
Copy link
Contributor Author

Thanks for reviewing, and sorry for reply late.

My change was wrong, so I changed to remove response.end() sentence.
Could you please re-review this PR?

@lpinca
Copy link
Member

lpinca commented Apr 12, 2018

@ikasumiwt thanks. LGTM.

@lpinca
Copy link
Member

lpinca commented Apr 12, 2018

@lpinca lpinca added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 12, 2018
Copy link
Contributor

@shigeki shigeki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Good Job.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Apr 13, 2018
PR-URL: nodejs#19507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR
Copy link
Member

Landed in 019a2c4 🎉

@BridgeAR BridgeAR closed this Apr 13, 2018
jasnell pushed a commit that referenced this pull request Apr 16, 2018
PR-URL: #19507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request May 1, 2018
PR-URL: nodejs#19507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. http Issues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants