Skip to content

Commit

Permalink
[fix] typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Jun 24, 2013
1 parent c278fb8 commit 4a97e8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions lib/node-http-proxy/http-proxy.js
Expand Up @@ -24,11 +24,12 @@
*/

var events = require('events'),
http = require('http'),
util = require('util'),
url = require('url'),
httpProxy = require('../node-http-proxy');
var events = require('events'),
http = require('http'),
util = require('util'),
url = require('url'),
ForwardStream = require('./streams/forward'),
httpProxy = require('../node-http-proxy');

//
// ### function HttpProxy (options)
Expand Down Expand Up @@ -97,7 +98,6 @@ var HttpProxy = exports.HttpProxy = function (options) {
this.enable.xforward = true;
}


//
// Setup additional options for WebSocket proxying. When forcing
// the WebSocket handshake to change the `sec-websocket-location`
Expand Down Expand Up @@ -170,7 +170,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
//
if (this.forward) {
this.emit('forward', req, res, this.forward);
this._forwardRequest(req);
req.pipe(new ForwardStream(this.forward));
}

//
Expand Down
3 changes: 2 additions & 1 deletion lib/node-http-proxy/streams/forward.js
Expand Up @@ -31,7 +31,8 @@ var ForwardStream = module.exports = function ForwardStream(options) {
outgoing[elem] = req[elem];
});

self.request = protocol.request(outgoing)
// pipe throw-safe? do we need to add a ` on 'error' ` handler?
self.request = protocol.request(outgoing, function() {});
});

};
Expand Down

0 comments on commit 4a97e8c

Please sign in to comment.