[BlueBream] Incorrectly processing "If-Modified-Since" in zope.app.file and z3c.blobfile
Cykooz
cykooz at googlemail.com
Mon Mar 8 15:39:17 EST 2010
2010/3/8 20:15 Baiju M <baiju.m.mail at gmail.com
<mailto:baiju.m.mail at gmail.com>>:
>
> I can see that you are explicitly using `long` above, so the type
> will be long ?
> What is the value of zope.datetime.time(header) ?
>
> Regards,
> Baiju M
zope/app/file/browser/file.py
>> header= self.request.getHeader('If-
Modified-Since', None)
>> lmt = zope.datetime.time(modified.isoformat())
>> if header is not None:
>> header = header.split(';')[0]
>> try: mod_since=long(zope.datetime.time(header))
>> except: mod_since=None
>> if mod_since is not None:
>> if lmt <= mod_since:
>> self.request.response.setStatus(304)
>> return ''
>> self.request.response.setHeader('Last-Modified',
>> zope.datetime.rfc1123_date(lmt))
zope.datetime.time(modified.isoformat()) - it is date of change of a
file transferred from browser.
It is compared to date of change of a file on a server - lmt.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/bluebream/attachments/20100308/48148280/attachment.html
More information about the bluebream
mailing list