GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http: default Agent.getName to 'localhost' · nodejs/node@431bf74

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _http_agent.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_http_agent.js‎

Copy file name to clipboardExpand all lines: lib/_http_agent.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,16 @@ Agent.prototype.createConnection = net.createConnection;
9494

9595
// Get the key for a given set of request options
9696
Agent.prototype.getName = function(options) {
97-
var name = '';
98-
99-
if (options.host)
100-
name += options.host;
101-
else
102-
name += 'localhost';
97+
var name = options.host || 'localhost';
10398

10499
name += ':';
105100
if (options.port)
106101
name += options.port;
102+
107103
name += ':';
108104
if (options.localAddress)
109105
name += options.localAddress;
106+
110107
return name;
111108
};
112109

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.