Apache proxy sensitivity #25

Closed
mauritslamers opened this Issue Jun 14, 2010 · 1 comment

Comments

Projects
None yet
2 participants

When socket.io-node is behind a Apache proxy, and the proxy is configured with a trailing slash, line 65 in listener.js errors out, as var path = url.parse(req.url).pathname will return undefined.

Reason is that when the apache proxy is configured with a trailing slash:

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all

ProxyPass /nodejs http://127.0.0.1:8080/
ProxyPassReverse /nodejs http://127.0.0.1:8080/

(the trailing slash is behind http://127.0.0.1:8080) req.url will start with '//' instead of '/' causing url.parse(req.url).pathname to return undefined. Line 65 in listener.js will fail as undefined has no function indexOf.

Solution is of course to prevent the trailing slash, but it would probably be useful to check for a valid path

Contributor

rauchg commented Jul 29, 2010

Proxying won't work with several of our transports (websocket, flashsocket, htmlfile)

This issue was closed.

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