Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6efa140

Browse filesBrowse files
dekinderfietsMylesBorins
authored andcommitted
lib: change http client path assignment
- change http client path assignment from to (it's more appropriate in this case). - since the inner condition is the only referencing the variable, moved the assignment to the inner condition. PR-URL: #35508 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
1 parent 48bc3fc commit 6efa140
Copy full SHA for 6efa140

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎lib/_http_client.js‎

Copy file name to clipboardExpand all lines: lib/_http_client.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ function ClientRequest(input, options, cb) {
141141
if (this.agent && this.agent.protocol)
142142
expectedProtocol = this.agent.protocol;
143143

144-
let path;
145144
if (options.path) {
146-
path = String(options.path);
145+
const path = String(options.path);
147146
if (INVALID_PATH_REGEX.test(path))
148147
throw new ERR_UNESCAPED_CHARACTERS('Request path');
149148
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.