Created by: mmoulton
The web/ws handlers allow a callback to be passed in that will be invoked on error. This callback was never being fired. This change fixes this by invoking the callback if present, otherwise emitting the 'error' event.
Included some new test cases to evaluate this state where the web/ws handlers are being used by an existing server. (ie: listen
is never called on the proxy)
Activity
Created by: yawnt
lookin good! would you mind moving the tests from the file you created to https://github.com/nodejitsu/node-http-proxy/blob/caronte/test/lib-http-proxy-passes-web-incoming-test.js ? we're trying to keep a 1-1 test-file js-file ratio :)
Created by: mmoulton
Got ya. I was assuming that since I was testing from the
createProxyServer
method down and not just the changes I made to web-incoming that you would want them in that file. I can move them if you would like.On Oct 21, 2013, at 2:48 PM, yawnt notifications@github.com wrote:
hey @mmoulton, thanks for doing this, although you got the wrong file xD.. i need them to be in https://github.com/nodejitsu/node-http-proxy/blob/caronte/test/lib-http-proxy-passes-web-incoming-test.js since it's where you modified the code :)
— Reply to this email directly or view it on GitHub.