| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd prefer just using hostHeader.slice() and hostHeader.indexOf(), but if others are not comfortable with that, at the very least the regex should be /:[\s\S]*$/ to match any character (including newlines).
Sorry, something went wrong.
There was a problem hiding this comment.
I left the hostHeader cleanup intentionally unmodified to match the original feature implemented PR #1110
I did not want to fix two unrelated issues in single PR dedicated to memory leak.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you remove the extra blank lines at lines 37, 44, 48, 54, and 56.
Sorry, something went wrong.
There was a problem hiding this comment.
Sure.
Sorry, something went wrong.
There was a problem hiding this comment.
Extra blank lines removed
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
FreeBSD CI failed due to force pushed commit New CI run: https://ci.nodejs.org/job/node-test-pull-request/4108/ |
Sorry, something went wrong.
|
I'm going to add lts-agenda label because this leak affects current LTS release too. |
Sorry, something went wrong.
|
CI before landing: https://ci.nodejs.org/job/node-test-pull-request/4127/ |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
I think this line should also be removed? #8647 (comment)
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks. Removed extra line.
Sorry, something went wrong.
If calling `https.request()` with `options.headers.host` defined and `options.servername` undefined, `https.Agent.createSocket` mutates connection `options` after `https.Agent.addRequest` has created empty socket pool array with mismatching connection name. This results in two socket pool arrays being created and only the last one gets eventually deleted by `removeSocket` - causing a memory leak. This commit fixes the leak by making sure that `addRequest` does the same modifications to `options` object as the `createSocket`. `createSocket` is intentionally left unmodified to prevent userland regressions. Test case included. Fixes: nodejs#6687
|
Trying CI again due to the AIX error: https://ci.nodejs.org/job/node-test-pull-request/4179/ |
Sorry, something went wrong.
|
If CI is green, I'll land this. |
Sorry, something went wrong.
|
I'll start landing this:
|
Sorry, something went wrong.
If calling `https.request()` with `options.headers.host` defined and `options.servername` undefined, `https.Agent.createSocket` mutates connection `options` after `https.Agent.addRequest` has created empty socket pool array with mismatching connection name. This results in two socket pool arrays being created and only the last one gets eventually deleted by `removeSocket` - causing a memory leak. This commit fixes the leak by making sure that `addRequest` does the same modifications to `options` object as the `createSocket`. `createSocket` is intentionally left unmodified to prevent userland regressions. Test case included. PR-URL: nodejs#8647 Fixes: nodejs#6687 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shvyo1987@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
@imyller I'm removing the agenda label for right now as there does not appear to be anything controversial about this change. After it has lived in a release for at least two weeks we can backport |
Sorry, something went wrong.
If calling `https.request()` with `options.headers.host` defined and `options.servername` undefined, `https.Agent.createSocket` mutates connection `options` after `https.Agent.addRequest` has created empty socket pool array with mismatching connection name. This results in two socket pool arrays being created and only the last one gets eventually deleted by `removeSocket` - causing a memory leak. This commit fixes the leak by making sure that `addRequest` does the same modifications to `options` object as the `createSocket`. `createSocket` is intentionally left unmodified to prevent userland regressions. Test case included. PR-URL: #8647 Fixes: #6687 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shvyo1987@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
If calling `https.request()` with `options.headers.host` defined and `options.servername` undefined, `https.Agent.createSocket` mutates connection `options` after `https.Agent.addRequest` has created empty socket pool array with mismatching connection name. This results in two socket pool arrays being created and only the last one gets eventually deleted by `removeSocket` - causing a memory leak. This commit fixes the leak by making sure that `addRequest` does the same modifications to `options` object as the `createSocket`. `createSocket` is intentionally left unmodified to prevent userland regressions. Test case included. PR-URL: #8647 Fixes: #6687 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shvyo1987@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
https
Description of change
If calling https.request() with options.headers.host defined and options.servername undefined, https.Agent.createSocket mutates connection options after https.Agent.addRequest has created empty socket pool array with mismatching connection name.
This results in two socket pool arrays being created and only the last one gets eventually deleted by removeSocket - effectively causing a memory leak.
This commit fixes the leak by making sure that addRequest does the same modifications to options object as the createSocket.
createSocket is intentionally left unmodified to prevent userland regressions.
Test case included.
Fixes: #6687
/cc @nodejs/http @nodejs/crypto