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

Broken attachments cause the "attachment does not exist" response to be cached, which causes the attachment to keep appearing broken even after successfully re-uploading that attachment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 4.2-milestone-1
    • 4.1.3
    • Old Core
    • None
    • Unknown
    • N/A
    • N/A

    Description

      How to reproduce:

      • attach a file while the default "hibernate" attachment storage is enabled
      • switch to the "file" attachment storage
      • try to download the file -> 404 page
      • re-upload the attachment (or use the porter to move the contents from the database to the filesystem)
      • try to get the attachment again -> 404 page

      Only a hard refresh or a cache clean can fix this wrong 404 page.

      The problem is that the HTTP headers are set before the content is actually loaded, and so the wrong cache instructions are set before an exception switches to the "404 attachment does not exist" page rendering.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            sdumitriu Sergiu Dumitriu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: