Commit f4611413 authored by Jens Vagelpohl's avatar Jens Vagelpohl

Minor change in Modified-Since header handling to un-break LocalFS

parent 6265044b
......@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__='$Revision: 1.97 $'[11:-2]
__version__='$Revision: 1.98 $'[11:-2]
import Globals, string, struct, content_types
from OFS.content_types import guess_content_type
......@@ -195,7 +195,12 @@ class File(Persistent,Implicit,PropertyManager,
if header is not None:
header=string.split(header, ';')[0]
mod_since=int(DateTime(header).timeTime())
last_mod =int(self._p_mtime)
if self._p_mtime:
last_mod = int(self._p_mtime)
else:
last_mod = 0
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