mikeal/request — Issue #165: avoiding invalid protocol crash
Author: mef
Created: 2012-01-31 14:47:16+00:00
State: open

Hi,

I am using request to un-shorten some urls. I have a problem when sometimes the redirect points to an ftp url. Then the node process crashes with the error "Invalid protocol" (main.js. around line 208).

I would rather have it stop and return the previous url, but I don't know how to do it. Simply removing the line
```throw new Error("Invalid protocol")
```
does not solve the problem.

Any suggestion?

Thanks,

m