Skip to content

Commit

Permalink
[dist minor] 2 space indents next time @samalba
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Dec 27, 2013
1 parent 8332e74 commit 7e8041d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/node-http-proxy/http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
if (this.changeOrigin) {
outgoing.headers.host = this.target.host;
// Only add port information to the header if not default port
// for this protocol.
// for this protocol.
// See https://github.com/nodejitsu/node-http-proxy/issues/458
if (this.target.port !== 443 && this.target.https ||
this.target.port !== 80 && !this.target.https) {
Expand Down Expand Up @@ -334,10 +334,10 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {

// Set the headers of the client response
if (res.sentHeaders !== true) {
Object.keys(response.headers).forEach(function (key) {
res.setHeader(key, response.headers[key]);
});
res.writeHead(response.statusCode);
Object.keys(response.headers).forEach(function (key) {
res.setHeader(key, response.headers[key]);
});
res.writeHead(response.statusCode);
}

function ondata(chunk) {
Expand Down

0 comments on commit 7e8041d

Please sign in to comment.