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

Invalid HTTP response when hitting a 4xx or 5xx error. So Not Permitted/500jsp will never be shown to user

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 5.0
    • 4.3, 5.0
    • None

    Description

      Symptoms

      When visiting a URL for an attachment that does not exist, the server returns a response that the browser cannot handle.

      Specifically, the 404 response contains the "Content-Encoding: gzip" header, but the response body is not actually gzip-encoded. The browser fails to render the 404 page and instead renders its own error message complaining about bad encoding. This also appears to affect 500 responses.

      This can be reproduced with Chrome, Safari and Firefox. See attactment for a screenshot from Firefox.

      An example URL to trigger this is

      http://localhost:8080/confluence/download/attachments/INVALIDNUMBER/43434/test.txt

      It would appear that this only happens when going directly to Confluence. If a proxy server sits in between, it seems to massage the response to fix the inconsistent encoding.

      Workaround

      Disable compression in Confluence:

      1. Browse > Confluence Admin > General Configuration
      2. Edit
      3. Uncheck "Compress HTTP Responses"

      Attachments

        Issue Links

          Activity

            People

              pcurren Paul Curren
              kmacleod Kenny MacLeod
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: