Merge pull request #164 from elfsternberg/553e7fbc335a9befd166d472f057aa50452a9d40

Modified the ad-hoc proxy lookup to use _getKey(), rather than the error-prone in-line method.
This commit is contained in:
Charlie Robbins 2011-12-13 22:21:07 -08:00
commit d1b19a1205

View File

@ -180,8 +180,8 @@ RoutingProxy.prototype.proxyRequest = function (req, res, options) {
options.host = location.host;
}
var key = options.host + ':' + options.port,
proxy;
var key = this._getKey(options),
proxy;
if (!this.proxies[key]) {
this.add(options);
@ -218,8 +218,8 @@ RoutingProxy.prototype.proxyWebSocketRequest = function (req, socket, head, opti
options.host = location.host;
}
var key = options.host + ':' + options.port,
proxy;
var key = this._getKey(options),
proxy;
if (!this.proxies[key]) {
this.add(options);