-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
[6.x] http: make socketPath work with no agent #19425
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
Conversation
|
Not sure if it's ok to apply bug fixes directly on v6.x but master and v8.x are not affected by this bug. |
da5c658 to
26e2a50
Compare
lib/_http_client.js
Outdated
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.
We don't need to pass oncreate to net.createConnection(), it always immediately returns a socket.
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.
Thanks, fixed.
|
bug fixes against a direct release branch are fine if other branches are unaffects /cc @nodejs/lts for review |
f6a2de7 to
e507d01
Compare
|
/cc @nodejs/http |
0a4c79b to
988cca8
Compare
Currently `Agent.prototype.createConnection()` is called uncoditionally if the `socketPath` option is used. This throws an error if no agent is used, preventing, for example, the `socketPath` and `createConnection` options to be used together. This commit fixes the issue by falling back to the `createConnection` option or `net.createConnection()`.
e507d01 to
6cc1820
Compare
|
Ping @nodejs/collaborators |
mcollina
left a comment
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
Currently `Agent.prototype.createConnection()` is called uncoditionally if the `socketPath` option is used. This throws an error if no agent is used, preventing, for example, the `socketPath` and `createConnection` options to be used together. This commit fixes the issue by falling back to the `createConnection` option or `net.createConnection()`. PR-URL: #19425 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com>
|
landed in 18acad3 |
Currently
Agent.prototype.createConnection()is called uncoditionallyif the
socketPathoption is used. This throws an error if no agent isused, preventing, for example, the
socketPathandcreateConnectionoptions to be used together.
This commit fixes the issue by falling back to the
createConnectionoption or
net.createConnection().Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes