Description
In Moin 1.9, the function _do_get(request, key) in cache.py compares a datetime object returned by request to an HTTP date string returned from the cache, so a status 304 is never returned. (I'm guessing the request object returned an HTTP date string too at one point.) In the attached patch, the numeric timestamp is returned from the cache instead and compared to the appropriate value from the datetime object.
Steps to reproduce
Request a cached resource multiple times and check the browser console, there should never be a status 304.
Example
Component selection
cache.py
Details
MoinMoin Version |
1.9.5 |
OS and Version |
Ubuntu 12.04 |
Python Version |
2.7.3 |
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
Please specify the werkzeug release number your moin code is using. Is it the werkzeug we distribute or a ubuntu package?
It should be the one that comes with Moin 1.9.5, I couldn't find a separate werkzeug package or directory on the system.
I did a bit more digging, the request object in Moin 1.8 returned a string for if_modified_since. Werkzeug added this property in version 0.2 (according to GitHub) and it was always a datetime object.
Plan
- Priority:
Assigned to: ThomasWaldmann
Status: fixed by http://hg.moinmo.in/moin/1.9/rev/d73431c6d2c9 - please test
Test: I applied the patch locally and it's working, I'm seeing 304s!