[BlueBream] Incorrectly processing "If-Modified-Since" in zope.app.file and z3c.blobfile

Baiju M baiju.m.mail at gmail.com
Mon Mar 8 12:15:19 EST 2010


2010/3/8 Кирилл Кузьминых <cykooz at googlemail.com>:
> In function zope.app.file.browser.file.FileView.show() (and
> z3c.blobfile.browser.file.FileView.show()) file modification date and date
> from Request Header "If-Modified-Since" are incorrectly compared.
> Value of file modification date calculate as:
>>> lmt = zope.datetime.time(modified.isoformat())
> type(lmt) == float
>
> Value of date from Request Header "If-Modified-Since" calculate as:
>>> mod_since = long(zope.datetime.time(header))
> type(mod_since) == long
>
> As a result - lmt almost always is more than mod_since on some milliseconds.
> For example:
> lmt = 1243412922.51
> mod_since = 1243412922

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


More information about the bluebream mailing list