the example for routing websockets and normal http traffic fails #33

elisehuard opened this Issue Apr 19, 2011 · 1 comment


None yet

1 participant


When I install http-proxy with npm, with node 0.4.2, and I run the example in the README doing a routing using server.on('upgrade', I get:
throw e; // process.nextTick error, or 'error' event on first tick
TypeError: Cannot read property 'headers' of undefined
at Object. (/usr/local/lib/node/.npm/http-proxy/0.3.1/package/lib/node-http-proxy.js:133:11)
at Object. (/Users/elise/Rails/MediaSquare/proxy.js:7:15)
at Module._compile (module.js:383:26)
at Object..js (module.js:389:10)
at Module.load (module.js:315:31)
at Function._load (module.js:276:12)
at Array. (module.js:402:10)
at EventEmitter._tickCallback (node.js:108:26)

It looks like using new httpProxy.HttpProxy() without parameters fails ...


oops sorry, needed to upgrade to more recent version of node of course. my apologies.

@elisehuard elisehuard closed this Apr 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment