Commit e4741a03 authored by 's avatar

Fix for bug #1270: Netscape Image Problems. Added casts to long to avoid

an overflow error caused when trying to convert dates sent by certain
versions of Netscape in the If-Modified-Since header.
parent 36192426
......@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__='$Revision: 1.103 $'[11:-2]
__version__='$Revision: 1.104 $'[11:-2]
import Globals, string, struct, content_types
from OFS.content_types import guess_content_type
......@@ -198,13 +198,11 @@ 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=int(DateTime(header).timeTime())
mod_since=long(DateTime(header).timeTime())
if self._p_mtime:
last_mod = int(self._p_mtime)
last_mod = long(self._p_mtime)
else:
last_mod = 0
last_mod = long(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