Commit a51ff439 authored by 's avatar

Fixed If-Modified-Since handling

parent d47cff76
......@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__='$Revision: 1.96 $'[11:-2]
__version__='$Revision: 1.97 $'[11:-2]
import Globals, string, struct, content_types
from OFS.content_types import guess_content_type
......@@ -194,8 +194,8 @@ class File(Persistent,Implicit,PropertyManager,
header=REQUEST.get_header('If-Modified-Since', None)
if header is not None:
header=string.split(header, ';')[0]
mod_since=DateTime(header).timeTime()
last_mod =self._p_mtime
mod_since=int(DateTime(header).timeTime())
last_mod =int(self._p_mtime)
if last_mod > 0 and last_mod <= mod_since:
RESPONSE.setStatus(304)
return RESPONSE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment