Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13427

.ico image attachments are served as image/vnd.microsoft.icon instead of image/x-icon, which IE does not recognize as image

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 8.0
    • Old Core
    • Unknown

    Description

      To reproduce:

      • Add an .ico attachment to a page (e.g. the one attached to this issue)
      • Add the following html code in your page:
        {{html clean="false"}}
        xicon image:
        <img src="/xwiki/bin/skin/Space/Page/favicon.ico" />
        
        microsoft-vnd icon
        
        <img src="/xwiki/bin/download/Space/Page/favicon.ico" />
        {{/html}}
        
      • Actual result: On IE11 the result will be that the image obtained with the "skin" action is displayed correctly, while the image obtained with "download" action is not. See attached image for the result on IE11.
      • Expected result: the download action should serve the image in the same way as skin action, so that the image can be used like any other image attachment.

      The reason for this difference is the Content type of the response sent by XWiki in the 2 cases and the fact the IE doesn't seem to understand one of them. I fetched the 2 urls with curl and obtained these 2 different content types:
      Skin action: Content-Type: image/x-icon;charset=ISO-8859-1
      Download action: Content-Type: image/vnd.microsoft.icon;charset= .

      Please note that IE also fails to use an .ico as a favicon if not served as image/vnd.microsoft.icon (if we'd try to customize the meta in the skin of the wiki and serve an attachment as the favicon).

      Download action seems to use tika for detecting the mime types of attachments (which skin does not), which was done in XWIKI-3249 .
      Now, there is a change in tika as well related to the handling of type image/vnd.microsoft.icon which is in https://issues.apache.org/jira/browse/TIKA-1084 , but I don't know if it's actually introducing a change in the way tika recognizes .ico or not.

      I tested on an XWiki 2.6 on tomcat and this issue does not reproduce.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            lucaa Anca Luca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: