summaryrefslogtreecommitdiff
path: root/lib/_http_agent.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_http_agent.js')
-rw-r--r--lib/_http_agent.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/_http_agent.js b/lib/_http_agent.js
index 12f8529c38..e1cfa6d7fc 100644
--- a/lib/_http_agent.js
+++ b/lib/_http_agent.js
@@ -256,6 +256,9 @@ function calculateServerName(options, req) {
servername = hostHeader.split(':', 1)[0];
}
}
+ // Don't implicitly set invalid (IP) servernames.
+ if (net.isIP(servername))
+ servername = '';
return servername;
}