This allows the lookup within ProxyTable to be a O(1) lookup on the routers object without RegExp. Instead of the O(n) RegExp based lookup that is currently in place.
This can be toggled by a boolean that can be passed to HttpProxy and ProxyTable.
Therefore for scenarios where you want a purely Host: header lookup this will be faster and will scale better when the proxy is infront of X'00 backends.
Initial version of host-only matching.
Adding maxEventListeners = 1000 and setMaxListeners(maxEventListeners…
…) on ProxyTable and HttpProxy.server
Don't let no Host header cause crashes.
Merge branch 'master'; commit 'd9631d426af5f8e5cec8de1a0aef5b16f67783…
…9b' into hostonly
Merge branch 'master'; commit 'ae7aa3ef1e1ac3e22e8faaed3a9c36ebdb27da…
…ca' into hostonly
Commented out setMaxListeners
Interesting. Will review more this weekend and give you some feedback. Speed improvements always welcome.
Sorry about the setMaxListeners foo, I was trying to get EventEmitter to not alert on that warning.
Looked over it at lunch. I like the feature, but I'll tweak it a bit before pulling it. This coincides nicely with the work I was doing to make some changes for node 0.4.0 now that https is stable.
Do you need this in a release that's backwards compatible to 0.2.x? Otherwise I'll just roll it into the version targeting 0.4.x.
I don't think there is much worry about 0.2.x compatibilty; 'we' should all be moving forwards? No?
I'de be interested in your tweaks.
Added this to v0.4.0. The rewrite for node 0.4.0 was substantial enough that merging your pull request didn't make sense. In the future though there are two things I really need before I could accept this: