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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • 5.0
    • Affects Version/s: 4.3, 5.0
    • Component/s: None

      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"

              Assignee:
              Paul Curren
              Reporter:
              Kenny MacLeod
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: