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

AggregateFilter does not properly handle cache timestamp check in Linux

    Details

      Description

      Steps to Reproduce:
      1. Start the portal in a Linux environment
      2. Access the everything resource URL:

      http://localhost:8080/o/frontend-js-web/everything.jsp?browserId=other&themeId=classic_WAR_classictheme&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&languageId=en_US&b=7010&t=1513021991893

      3. In a terminal run:

      stat {tomcat_home}/work/Catalina/localhost/ROOT/aggregate/javascript.everything.files
      

      4. Change the time-stamp from the resource URL (the last query string) and access the resource again:

      http://localhost:8080/o/frontend-js-web/everything.jsp?browserId=other&themeId=classic_WAR_classictheme&colorSchemeId=01&minifierType=js&minifierBundleId=javascript.everything.files&languageId=en_US&b=7010&t=1513021991894

      5. In the terminal, run the command again

      Expected Behavior: Change date does not get updated
      Actual Behavior: Change date gets updated

      Notes
      Unix timestamps truncate the millilseconds portion, however, we are doing a direct comparison in AggregateFilter which causes the cache file to never be utilized:

      https://github.com/liferay/liferay-portal/blob/2029efac9154152b124a81e38362697806940ddc/portal-impl/src/com/liferay/portal/servlet/filters/aggregate/AggregateFilter.java#L293

        Attachments

          Activity

            People

            • Assignee:
              raven.song Raven Song
              Reporter:
              jonathan.mccann Jonathan McCann
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 22 weeks, 2 days ago

                Packages

                Version Package
                7.0.0 DXP FP42
                7.0.6 CE GA7
                7.0.0 DXP SP8
                7.0.X
                7.1.0 M2
                7.1.X
                Master