Attachment 'cache.patch'
Download 1 --- action/cache.py.orig 2012-12-30 09:39:24.000000000 +0100
2 +++ action/cache.py 2012-12-30 10:01:37.000000000 +0100
3 @@ -202,7 +202,7 @@
4 """ get last_modified and headers cached for key """
5 meta_cache = caching.CacheEntry(request, cache_arena, key+'.meta', cache_scope, do_locking=do_locking, use_pickle=True)
6 meta = meta_cache.content()
7 - return meta['httpdate_last_modified'], meta['headers']
8 + return meta['last_modified'], meta['headers']
9
10
11 def _get_datafile(request, key):
12 @@ -214,9 +214,13 @@
13
14 def _do_get(request, key):
15 """ send a complete http response with headers/data cached for key """
16 + import calendar
17 try:
18 last_modified, headers = _get_headers(request, key)
19 - if request.if_modified_since == last_modified:
20 + request_ims = request.if_modified_since
21 + if request_ims != None:
22 + request_ims = int(calendar.timegm(request_ims.timetuple()))
23 + if request_ims == int(last_modified):
24 request.status_code = 304
25 else:
26 for k, v in headers:
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.