[fix] typo

This commit is contained in:
yawnt 2013-06-24 12:17:52 +02:00 committed by cronopio
parent bd62a68017
commit 492134f830
2 changed files with 9 additions and 8 deletions

View File

@ -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)
@ -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`
@ -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));
}
//

View File

@ -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() {});
});
};