oesmith/puffing-billy — pull request #29 by carols10cents (2013-11-25 00:13:19+00:00)
Title: Catch invalid URI exceptions to support http://:0 URLs

For img tags, since some browsers block if you leave the src attributes empty, the current technique is to use //:0 as the URL. This causes puffing billy to fail, even when these requests are stubbed, since the URI library throws an exception. This statement has a fallback of empty string anyway, so catch exceptions and use the fallback.

I totally understand if you choose not to merge this since it's potentially introducing silent failures when people specify invalid URIs but didn't mean to.

Also, I tried to write a test for this, but it turns out faraday uses URI for parsing too, so it throws errors. [Faraday now (well, in the 0.9.0rcs) allows you to specify a less strict URI parser](https://github.com/lostisland/faraday/issues/258) like Addressable::URI, but when I tried to upgrade faraday to 0.9.0.rc6 I got ``undefined method `keepalive=' for #`` which looks like something to do with the way faraday is interacting with `EventMachine` and I got frustrated.