URI resolution chokes on URI scheme not supported by JVM #66

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@argv-minus-one
Contributor

argv-minus-one commented Nov 2, 2012

I am using Calabash with a custom URIResolver that resolves URIs of the site scheme (e.g. site:/pages/index.html).

Unfortunately, Calabash's XProcURIResolver tries to construct a java.net.URL from the URI, and since the running JVM doesn't have a handler for the site scheme, this fails, even though the custom URIResolver would translate it into something usable.

This is a patch for that problem. Now, the MalformedURLException is caught and ignored, and the unaltered input URI used if a java.net.URL could not be constructed. I'm not familiar with the jar URI use case your code there is meant to address, but I'm hoping this change won't break that use case.

Ignore MalformedURLExceptions in the URI resolver. The input URI shou…
…ld not be required to be valid even before URI resolution.
@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Jan 29, 2013

Owner

I think this is fixed for 1.0.6.

Owner

ndw commented Jan 29, 2013

I think this is fixed for 1.0.6.

@ndw ndw closed this Jan 29, 2013

ndw added a commit that referenced this pull request Jan 29, 2013

ndw added a commit that referenced this pull request Jan 29, 2013

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