Skip to content

proxyWebSocketRequest not utilizing routes #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

proxyWebSocketRequest not utilizing routes #72

ghost opened this issue Jul 18, 2011 · 4 comments

Comments

@ghost
Copy link

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

@Marak
Copy link
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.

@indexzero
Copy link
Member

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?

@dominictarr
Copy link
Contributor

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
@dominictarr
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants