From 93496e9badb9de273c24477eea9f5f3db3afad44 Mon Sep 17 00:00:00 2001 From: celer Date: Mon, 15 Apr 2013 15:41:22 -0600 Subject: [PATCH] Fixed issue where 80 was included in the 'Header' field which causes some *cough-cloudfoundry.com* services to have issues --- lib/node-http-proxy/http-proxy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/node-http-proxy/http-proxy.js b/lib/node-http-proxy/http-proxy.js index ffd5c957d..079488aaf 100644 --- a/lib/node-http-proxy/http-proxy.js +++ b/lib/node-http-proxy/http-proxy.js @@ -237,7 +237,8 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) { // don't revert this without documenting it! // if (this.changeOrigin) { - outgoing.headers.host = this.target.host + ':' + this.target.port; + var port = (this.target.port-80==0?"":":"+this.target.port); + outgoing.headers.host = this.target.host + port; } //