Tapestry 5
  1. Tapestry 5
  2. TAP5-1392

SVG assets rended with wrong content type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      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

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        293d 9h 39m 1 Howard M. Lewis Ship 17/Oct/11 23:45
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #580 (See https://builds.apache.org/job/tapestry-trunk-freestyle/580/)
        TAP5-1392: SVG assets rended with wrong content type

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1185420
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/assets/AssetsModule.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #580 (See https://builds.apache.org/job/tapestry-trunk-freestyle/580/ ) TAP5-1392 : SVG assets rended with wrong content type hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1185420 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/assets/AssetsModule.java
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Howard M. Lewis Ship [ hlship ]
        Fix Version/s 5.3 [ 12316024 ]
        Resolution Fixed [ 1 ]
        Ivan Khalopik created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Ivan Khalopik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development