Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.5
-
None
-
None
Description
In org.apache.fop.apps.io.InternalResourceResolver there is the following code:
public Resource getResource(URI uri) throws IOException { if (uri.getScheme() != null && uri.getScheme().startsWith("data")) { return new Resource(resolveDataURI(uri.toASCIIString())); } return resourceResolver.getResource(resolveFromBase(uri)); }
All URIs with a scheme starting with "data" are treated as a data URI. This means schemes like "dataFoo" are not delegated to the resourceResolver. I think this should be equals instead.
The string overload works correctly because it includes the colon:
public Resource getResource(String stringUri) throws IOException, URISyntaxException { if (stringUri.startsWith("data:")) { return new Resource(resolveDataURI(stringUri)); } return getResource(cleanURI(stringUri)); }