aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/apps/FOURIResolver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/apps/FOURIResolver.java')
-rw-r--r--src/java/org/apache/fop/apps/FOURIResolver.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/apps/FOURIResolver.java b/src/java/org/apache/fop/apps/FOURIResolver.java
index 182b49f1b..68eda5825 100644
--- a/src/java/org/apache/fop/apps/FOURIResolver.java
+++ b/src/java/org/apache/fop/apps/FOURIResolver.java
@@ -72,6 +72,11 @@ public class FOURIResolver
public Source resolve(String href, String base)
throws javax.xml.transform.TransformerException {
+ //data URLs can be quite long so don't try to build a File (can lead to problems)
+ if (href.startsWith("data:")) {
+ return parseDataURI(href);
+ }
+
URL absoluteURL = null;
File f = new File(href);
if (f.exists()) {
@@ -80,8 +85,6 @@ public class FOURIResolver
} catch (MalformedURLException mfue) {
log.error("Could not convert filename to URL: " + mfue.getMessage(), mfue);
}
- } else if (href.startsWith("data:")) {
- return parseDataURI(href);
} else {
URL baseURL = toBaseURL(base);
if (baseURL == null) {