-
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
Wrong legacy API parameter caused by typo in _http_agent.js #5051
Comments
This does appear to be the case. Is this breaking something for you? |
Yes, of course! If it didn't break anything, why did I spend my time digging into the code, finding the problem, and issuing a bug report? |
@asukakenji would you mind opening a PR, including a regression test? |
Of course I would like to do something to help! But it is my first time doing that, would you please point me to some guide lines? Thanks! |
Sure thing! Please see https://github.com/nodejs/node/blob/master/CONTRIBUTING.md. |
Fix `options` usage on `lib/_http_agent.js` for the Legacy API. Fixes: nodejs#5051
Rename the tests appropriately alongside mentioning the subsystem Also, make a few basic changes to make sure the tests conform to the standard test structure - Rename test-regress-nodejsGH-9819 to test-crypto-tostring-segfault - Rename test-regress-nodejsGH-5051 to test-http-addrequest-localaddress - Rename test-regress-nodejsGH-5727 to test-net-listen-invalid-port - Rename test-regress-nodejsGH-5927 to test-tty-stdin-pipe - Rename test-regress-nodejsGH-6235 to test-v8-global-setter Refs: nodejs#19105 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the tests conform to the standard test structure. - Rename test-regress-GH-9819 to test-crypto-tostring-segfault - Rename test-regress-GH-5051 to test-http-addrequest-localaddress - Rename test-regress-GH-5727 to test-net-listen-invalid-port - Rename test-regress-GH-5927 to test-tty-stdin-pipe - Rename test-regress-GH-6235 to test-v8-global-setter PR-URL: #19275 Refs: #19105 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the tests conform to the standard test structure. - Rename test-regress-GH-9819 to test-crypto-tostring-segfault - Rename test-regress-GH-5051 to test-http-addrequest-localaddress - Rename test-regress-GH-5727 to test-net-listen-invalid-port - Rename test-regress-GH-5927 to test-tty-stdin-pipe - Rename test-regress-GH-6235 to test-v8-global-setter PR-URL: #19275 Refs: #19105 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the tests conform to the standard test structure. - Rename test-regress-GH-9819 to test-crypto-tostring-segfault - Rename test-regress-GH-5051 to test-http-addrequest-localaddress - Rename test-regress-GH-5727 to test-net-listen-invalid-port - Rename test-regress-GH-5927 to test-tty-stdin-pipe - Rename test-regress-GH-6235 to test-v8-global-setter PR-URL: #19275 Refs: #19105 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the tests conform to the standard test structure. - Rename test-regress-nodejsGH-9819 to test-crypto-tostring-segfault - Rename test-regress-nodejsGH-5051 to test-http-addrequest-localaddress - Rename test-regress-nodejsGH-5727 to test-net-listen-invalid-port - Rename test-regress-nodejsGH-5927 to test-tty-stdin-pipe - Rename test-regress-nodejsGH-6235 to test-v8-global-setter PR-URL: nodejs#19275 Refs: nodejs#19105 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
At https://github.com/nodejs/node/blob/master/lib/_http_agent.js#L114:
The line should read:
instead of:
The
localAddress
parameter was added to theaddRequest()
function inlib/http.js
since 1e9bcf2#diff-1c0f1c434b17b7f8795d44a51a14320a.The function was then refactored into
_http_agent.js
at 12cd133.However, the
localAddress
parameter was mistaken to bepath
during the refactoring. Below are some evidences showing that the parameter should belocalAddress
.Here is the current code in
master
:Here is how the
options
object is used. It clearly expectslocalAddress
:Here is the code in an old release (
v0.10.36
, which is the version currently used on AWS):These clears shows the format
host:port:localAddress
:The text was updated successfully, but these errors were encountered: