Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-7113

Bamboo's built-in webserver does not serve SVG files properly

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.6.4, 2.7 beta2, 2.7
    • 2.6.2
    • Artifacts
    • None

      In the Apache Ant build.xml for a PHP-based project I use PHP_Depend to generate software visualizations in SVG format. These SVG files are stored as an artifact by Bamboo. Unfortunately, Bamboo's built-in webserver does not send the correct headers and / or MIME type so that a web browser wants to download (and save) the files instead of showing them. PNG files, however, are served correctly.

      It would be nice if Bamboo would serve SVG files correctly. Thanks!

            [BAM-7113] Bamboo's built-in webserver does not serve SVG files properly

            Dear Krystian,

            I've just created a ticket as requested (BSP-3647). Hope this helps.

            With kind regards

            Robin Speekenbrink
            Kingsquare Information Services

            Robin Speekenbrink added a comment - Dear Krystian, I've just created a ticket as requested (BSP-3647). Hope this helps. With kind regards Robin Speekenbrink Kingsquare Information Services

            I've double-checked and it works for version 2.6.3, should also work for all 2.6.X. Please make sure that you restarted your Bamboo after changing mimetypes.xml file.

            $ curl -I http://localhost:8085/browse/SVG-DEF-2/artifact/SVG-logo/SVG-logo.svg
            HTTP/1.1 200 OK
            Expires: Mon, 02 Nov 2020 11:18:30 GMT
            Cache-Control: max-age=315360000000
            Cache-Control: public
            Content-Type: image/svg+xml
            Content-Length: 2368
            Last-Modified: Fri, 05 Nov 2010 10:55:41 GMT
            Content-Disposition: inline; filename="SVG-logo.svg"
            Server: Jetty(6.1.15)
            

            If the problem still persists please create a ticket in our support JIRA: https://support.atlassian.com/browse/BSP and provide more details on your installation.

            Krystian Brazulewicz added a comment - I've double-checked and it works for version 2.6.3, should also work for all 2.6.X. Please make sure that you restarted your Bamboo after changing mimetypes.xml file. $ curl -I http://localhost:8085/browse/SVG-DEF-2/artifact/SVG-logo/SVG-logo.svg HTTP/1.1 200 OK Expires: Mon, 02 Nov 2020 11:18:30 GMT Cache-Control: max-age=315360000000 Cache-Control: public Content-Type: image/svg+xml Content-Length: 2368 Last-Modified: Fri, 05 Nov 2010 10:55:41 GMT Content-Disposition: inline; filename="SVG-logo.svg" Server: Jetty(6.1.15) If the problem still persists please create a ticket in our support JIRA: https://support.atlassian.com/browse/BSP and provide more details on your installation.

            Kingsquare added a comment -

            After adding the mimetype to the mimetypes.xml in Bamboo, this doesnt seem to work for my installation. I still receive the
            Content-Type application/octet-stream
            Content-Disposition attachment; filename="jdepend.svg"
            Server Jetty(6.1.15)

            headers, where the disposition field should be removed and the mime-type should be something like image/svg+xml

            Kingsquare added a comment - After adding the mimetype to the mimetypes.xml in Bamboo, this doesnt seem to work for my installation. I still receive the Content-Type application/octet-stream Content-Disposition attachment; filename="jdepend.svg" Server Jetty(6.1.15) headers, where the disposition field should be removed and the mime-type should be something like image/svg+xml

            Krystian Brazulewicz added a comment - - edited

            Sebastian,
            to quickfix that issue in your instance please add the following markup:

            <mime-mapping>
              <extension>svg</extension>
              <mime-type>image/svg+xml</mime-type>
            </mime-mapping>
            

            to WEB-INF/mimetypes.xml file in your Bamboo installation.

            Krystian Brazulewicz added a comment - - edited Sebastian, to quickfix that issue in your instance please add the following markup: <mime-mapping> <extension> svg </extension> <mime-type> image/svg+xml </mime-type> </mime-mapping> to WEB-INF/mimetypes.xml file in your Bamboo installation.

            AntonA added a comment -

            Probably need to fix jetty's mime types file.

            AntonA added a comment - Probably need to fix jetty's mime types file.

              kbrazulewicz Krystian Brazulewicz
              a0eed50a464c Sebastian Bergmann
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: