Would it be better if we used nodejs' `url.parse` function to parse the URL and inspect the protocol, host and path?

http://nodejs.org/docs/latest/api/url.html