Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-144830

When requesting a image thumbnail, If it doesn't exists, WebServerServlet returns a empty image instead of a 404 error

Details

    Description

      When requesting a image thumbnail, If it doesn't exists, WebServerServlet returns a empty image with 200 code instead of a 404 error

      The customer complains that returning 200 code can cause problems to the CDN and other elements, as they are caching them unless a error code is returned.

      It can also cause problems to the user browsers, as we send a wrong image that cannot be rendered.

      Steps to reproduce

      1. Upload a image to the documents and media section
      2. Open the image, click on the button on the upper right side of the page
      3. Copy the "Latest Version URL" URL
      4. Append &imageThumbnail=1 to the end of the URL and open it in a different tab
      5. The thumbnail will be displayed correctly
      6. Go to Control Panel => Adaptive Media
      7. Deactivate all the defined image resolutions
      8. Delete all the defined image resolutions
      9. Open again the URL with the &imageThumbnail=1 parameter in a different browser (the image is cached in the browser)
        • Expected behavior: An 404 error "The requested resource could not be found." is displayed
        • Wrong behavior:
          • Firefox returns a "The image xxx cannot be displayed because it contains errors."
          • Chrome returns a empty image

      Attachments

        Issue Links

          Activity

            People

              yvonne.han Yvonne Han
              jorge.diaz Jorge Diaz
              Austin Chiang Austin Chiang
              Jorge Diaz Jorge Diaz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1 year, 2 weeks, 1 day ago

                Packages

                  Version Package
                  7.0.X
                  7.1.X
                  7.2.10 DXP FP18
                  7.2.X
                  7.3.X
                  7.4.3.8 CE GA8
                  7.4.13 DXP U4
                  Master