Tapestry
  1. Tapestry
  2. TAPESTRY-2128

If-Modified-Since always returns not modified for js and css in jar files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.9
    • Fix Version/s: 5.0.10
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      Mac OSX, Tomcat-5.5.25

      Description

      I'm looking at upgrading from 5.0.6 to 5.0.9, after the upgrade I'm getting the old version of tapestry.js every time I load the page.

      I tracked the problem back through the AssetDispatcher, ResourceCacheImpl and finally the URLChangeTracker. It looks like requests coming in for the css and js files in the jars are using a url like this:
      jar:file:/Users/joshcanfield/workspace/out/exploded/thedailytubeWeb/WEB-INF/lib/tapestry-core-5.0.9.jar!/org/apache/tapestry/default.css

      The URLChangeTracker sees that the protocol isn't file and returns 0.

      ResourceCacheImpl assumes that the return value is the last update time, and stores it. Then when AssetDispatcher checks to see if the file has changed since the date passed in the If-Modified-Since header, it's always going to be less so it sends a SC_NOT_MODIFIED error back to the browser.

      It seems like the right behavior here would be to return the current time, or even Long.MAX_VALUE

        Activity

        Josh Canfield created issue -
        Josh Canfield made changes -
        Field Original Value New Value
        Summary Unable to load new version of jar'd javascript after redeploy If-Modified-Since always returns not modified for js and css in jar files
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.10 [ 12312936 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12422932 ] Default workflow, editable Closed status [ 12568386 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568386 ] jira [ 12591443 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        16h 30m 1 Howard M. Lewis Ship 07/Feb/08 20:45
        In Progress In Progress Closed Closed
        1h 56m 1 Howard M. Lewis Ship 07/Feb/08 22:42

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Josh Canfield
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development