Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-14314

Images & attachments broken on pages containing non-US-ASCII characters in the title

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Medium Medium
    • None
    • 2.10
    • None

      We had a page named "Håndjern" (note the danish letter 'å' in the title).

      When we added an attachment such as an image to the page, and then tried to display the image in the page, the image appears broken and could not even be downloaded from the attachment list - it's as if the attachment was not there, even if it appears in the attachment list.

      When we changed the name from "Håndjern" to "Haandjern", the problem went away and the attachment was displayed normally.

      Since it's a quite normal thing to have danish pages named using danish characters, this is a major problem for us.

            [CONFSERVER-14314] Images & attachments broken on pages containing non-US-ASCII characters in the title

            Hi Andrew,

            Yes, the syntax is correct.

            I am no longer able to reproduce it either. I even renamed the bad page back to "Håndjern" and the attachments are still showing.

            Shrug I guess the page was somehow created in a weird state. Probably not worth digging further into.

            You can close the issue.

            Thanks,
            Odinn

            Odinn Sørensen added a comment - Hi Andrew, Yes, the syntax is correct. I am no longer able to reproduce it either. I even renamed the bad page back to "Håndjern" and the attachments are still showing. Shrug I guess the page was somehow created in a weird state. Probably not worth digging further into. You can close the issue. Thanks, Odinn

            Hi Odinn,

            I believe you are right about the URI encoding, as it should generate a URL of the form /download/attachments/3705579/filename.jpg but I am still not able to reproduce this problem. I have created a page with the same name, and I can attach and display images fine.

            Are you display images using the following syntax :

            !filename.jpg!
            

            ?

            Andrew Lynch (Inactive) added a comment - Hi Odinn, I believe you are right about the URI encoding, as it should generate a URL of the form /download/attachments/3705579/filename.jpg but I am still not able to reproduce this problem. I have created a page with the same name, and I can attach and display images fine. Are you display images using the following syntax : !filename.jpg! ?

            We are running tomcat 6.0.16 behind apache 2.2.9, where we use mod_proxy_ajp to send request into tomcat.

            For our Confluence virtualhost in apache, this is the proxy line:

            ProxyPass / ajp://localhost:8955/

            This is our tomcat connector:

            <Connector
            port="8955" minProcessors="250" maxProcessors="1000"
            address="localhost" enableLookups="false" redirectPort="8443"
            debug="0"
            useURIValidationHack="false" useBodyEncodingForURI="true"
            protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
            protocol="AJP/1.3"/>

            Per your suggestion I replaced the two URI parameters so it looks like this:

            <Connector
            port="8955" minProcessors="250" maxProcessors="1000"
            address="localhost" enableLookups="false" redirectPort="8443"
            debug="0"
            URIEncoding="UTF-8"
            protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
            protocol="AJP/1.3"/>

            Unfortunately this did not change anything - the image still appears broken.

            Anyway I'm not convinced that the problem is directly related to the URI encoding, because for attachments the URI does not contain the page name. The attachment filename itself only contains US-ASCII letters.

            Odinn Sørensen added a comment - We are running tomcat 6.0.16 behind apache 2.2.9, where we use mod_proxy_ajp to send request into tomcat. For our Confluence virtualhost in apache, this is the proxy line: ProxyPass / ajp://localhost:8955/ This is our tomcat connector: <Connector port="8955" minProcessors="250" maxProcessors="1000" address="localhost" enableLookups="false" redirectPort="8443" debug="0" useURIValidationHack="false" useBodyEncodingForURI="true" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" protocol="AJP/1.3"/> Per your suggestion I replaced the two URI parameters so it looks like this: <Connector port="8955" minProcessors="250" maxProcessors="1000" address="localhost" enableLookups="false" redirectPort="8443" debug="0" URIEncoding="UTF-8" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" protocol="AJP/1.3"/> Unfortunately this did not change anything - the image still appears broken. Anyway I'm not convinced that the problem is directly related to the URI encoding, because for attachments the URI does not contain the page name. The attachment filename itself only contains US-ASCII letters.

            Hi Odinn,

            This is most likely caused by your application server not being configured to handle UTF-8 encoded requests. We have documentation here detailing how to configure this for Tomcat.

            Regards,
            Andrew Lynch

            Andrew Lynch (Inactive) added a comment - Hi Odinn, This is most likely caused by your application server not being configured to handle UTF-8 encoded requests. We have documentation here detailing how to configure this for Tomcat. Regards, Andrew Lynch

              Unassigned Unassigned
              fec60ec16b86 Odinn Sørensen
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: