SVG assets rended with wrong content type
-----------------------------------------

                 Key: TAP5-1392
                 URL: https://issues.apache.org/jira/browse/TAP5-1392
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2
            Reporter: Ivan Khalopik
            Priority: Minor


When svg image added to page like asset in img tag, it is rended with 
application/xml content type instead of image/svg+xml, so that browsers doesn't 
show it.
When it is added to page as static resource all is ok.

The problem is in this code (StreamableResourceImpl):

        URLConnection connection = url.openConnection();
        contentType = connection.getContentType();

it returns application/xml, while code below will return image/svg+xml:

servletContext.getMimeType(resource.getPath());

Tested with Jetty6 + Chrome8,Opera11

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to