[Zope-dev] More Image Errors
Chris Withers
chrisw@nipltd.com
Mon, 03 Jul 2000 13:58:15 +0100
Chris Withers wrote:
> I'm going to knock up a patch for this anyway and chuck it in the
> collector.
The patch (which is for the latest CVS, but shouldn't be too hard to
modify for other versions ;-)
Chris
===================================================================
RCS file: /cvs-repository/Zope2/lib/python/OFS/Image.py,v
retrieving revision 1.109
diff -r1.109 Image.py
200,208c200,211
< header=string.split(header, ';')[0]
< mod_since=long(DateTime(header).timeTime())
< if self._p_mtime:
< last_mod = long(self._p_mtime)
< else:
< last_mod = long(0)
< if last_mod > 0 and last_mod <= mod_since:
< RESPONSE.setStatus(304)
< return RESPONSE
---
> try:
> header=string.split(header, ';')[0]
> mod_since=long(DateTime(header).timeTime())
> if self._p_mtime:
> last_mod = long(self._p_mtime)
> else:
> last_mod = long(0)
> if last_mod > 0 and last_mod <= mod_since:
> RESPONSE.setStatus(304)
> return RESPONSE
> except:
> pass