proxyWebSocketRequest not utilizing routes #72

Closed
ghost opened this Issue Jul 18, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@ghost

ghost commented Jul 18, 2011

While exploring node-http-proxy, among other things (such as the rather depressing documentation), I noticed that this function doesn't utilize routing preferences set when calling HttpProxy(options).

https://gist.github.com/1088665

Contributor

Marak commented Jul 18, 2011

I'll have someone look into this, looks like it could be a bug.

You should understand that the routing table stuff is all for convenience. If you read the "rather depressing documentation" you'll understand that building a custom routing scenario is trivial.

Owner

indexzero commented Jul 18, 2011

This is easy enough to fix. For optimization purposes (i.e. less function invocations on each request), this code (https://github.com/nodejitsu/node-http-proxy/blob/master/lib/node-http-proxy.js#L344-372) should basically just be duplicated inside of proxyWebSocketRequest.

@dominctarr thoughts? Have you had a chance to really dig through the code base yet?

Contributor

dominictarr commented Jul 19, 2011

The gist does not have enough code to reproduce the problem, and the websocket examples are broken, but looks fairly simple, will reproduce first. the websocket examples are broken, then fix.

dominictarr added a commit that referenced this issue Jul 21, 2011

Contributor

dominictarr commented Jul 21, 2011

fixed in efa17ef

duplicating the code is a problem, will refactor when I'm more familiar with the code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment