http: refactor to make servername option normalization testable#38733
Merged
aduh95 merged 2 commits intonodejs:mainfrom Oct 6, 2023
Merged
http: refactor to make servername option normalization testable#38733aduh95 merged 2 commits intonodejs:mainfrom
aduh95 merged 2 commits intonodejs:mainfrom
Conversation
Ayase-252
reviewed
May 19, 2021
Comment on lines
+341
to
+349
| function normalizeServerName(options, req) { | ||
| if (!options.servername && options.servername !== '') | ||
| options.servername = calculateServerName(options, req); | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Should we avoid mutating an argument in a function?
Contributor
There was a problem hiding this comment.
I agree it would be good to refactor that away. But can happen in a follow up PR.
ac673df to
b43137a
Compare
aduh95
approved these changes
Sep 20, 2023
Comment on lines
+341
to
+349
| function normalizeServerName(options, req) { | ||
| if (!options.servername && options.servername !== '') | ||
| options.servername = calculateServerName(options, req); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
I agree it would be good to refactor that away. But can happen in a follow up PR.
Collaborator
Collaborator
22 tasks
Collaborator
This was referenced Sep 22, 2023
Contributor
|
Landed in b866e38 |
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
Refs: https://coverage.nodejs.org/coverage-36bb31be5f0b85a0/lib/_http_agent.js.html#L316 PR-URL: nodejs#38733 Reviewed-By: Antoine du Hamel <[email protected]>
targos
pushed a commit
that referenced
this pull request
Nov 11, 2023
Refs: https://coverage.nodejs.org/coverage-36bb31be5f0b85a0/lib/_http_agent.js.html#L316 PR-URL: #38733 Reviewed-By: Antoine du Hamel <[email protected]>
debadree25
pushed a commit
to debadree25/node
that referenced
this pull request
Apr 15, 2024
Refs: https://coverage.nodejs.org/coverage-36bb31be5f0b85a0/lib/_http_agent.js.html#L316 PR-URL: nodejs#38733 Reviewed-By: Antoine du Hamel <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: https://coverage.nodejs.org/coverage-36bb31be5f0b85a0/lib/_http_agent.js.html#L316