https://issues.apache.org/bugzilla/show_bug.cgi?id=49889
Summary: [PATCH] Batik does not support nested images from
webservers returning 404
Product: Batik
Version: 1.8
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: SVG Rasterizer
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25996)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25996)
Patch to ParsedURLData.java to support reading the alternate stream.
If an SVG image contains a reference to an external image that should be read
from a webserver, and that webserver returns the image back with a 404 header
(indicating that the desired address was not found), the contents of the
response is discarded, and Batik throws an exception.
This prevents using Apache ErrorDocument directives to have default images as
the back-end.
As there's no reason to assume that just because the response was an error we
should discard the result (the response could still be a valid image), a better
approach would be to catch the corresponding error when trying to read the
stream and switch the ErrorStream instead.
I've attached a patch to org.apache.util.ParsedURLData.java that supports this
modification.
Other SVG Renderers (e.g. Google Chrome, Firefox, etc.) seem to operate this
way (i.e. they pull in the data from the image regardless of the status code of
the response).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]