Uploaded image for project: 'Magnolia DAM Module'
  1. Magnolia DAM Module
  2. MGNLDAM-700

DamDownloadServlet returns HTTP 200 when an exception is thrown

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 2.2.6
    • 2.1.7
    • DAM Core
    • Magnolia 5.4.7
      Oracle XE 11.2.0.2
    • Yes
    • Yes
    • Kromeriz 105
    • 5

    Description

      DamDownloadServlet doesn't handle exceptions thrown within the doGet method:

          protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              try {
                  process(request, response);
              } catch (Exception e) {
                  log.error("error during download", e);
              }
          }
      

      If anything wrong happens when processing of the dam download, the exception thrown is only logged. The servlet should handle the error either throwing a new exception or taking care of the response manually.

      This affects cases like using a database for the repository (with a file system datastore) and deleting (or loosing connection in case of NFS) the datastore folder.

      When accessing an image through the dam servlet:
      http://localhost:8080/magnoliaAuthor/dam/jcr:5b9ee0d9-9ee2-4943-ba91-ff8240065fda/youtube.png
      It will return HTTP 200 with an empty image. Screenshot attached.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ajuran AntonĂ­n Juran
                ebguilbert Edwin Guilbert
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD