[ZCM] [ZC] 1236/ 2 Comment "Problem with date handling in Zope"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Sat May 15 09:49:49 EDT 2004
Issue #1236 Update (Comment) "Problem with date handling in Zope"
Status Pending, Zope/bug medium
To followup, visit:
http://zope.org/Collectors/Zope/1236
==============================================================
= Comment - Entry #2 by camil7 on May 15, 2004 9:49 am
The modification date is actually computed by the "HEAD"
method of the corresponding object.
Unless overridden, this is usually either:
./webdav/Collection.py for folderish objects or
./webdav/Resource.py for other stuff.
For example "ImageFile" objects overwrite this to set the
content type.
The normal last modification time is the last
modification of the object in the ZODB.
Ususally this is only loosely related to changes
of what is shown on this page.
However Zope cannot do much better than this.
Determining what is actually rendered on a dynamically
created page is somewhat out of scope, as Zope's
publishing mechanism is unfortunately to flexible to
determine the information a proiri. <0.5 wink />
The "Last-Modified" header thus is similar
bogus like the "content-lenght" header for HEAD request.
It should be the responsibility of the application
running on top of Zope to implement this properly.
E.g. in Your case I would recomment to report the issue to the Silva issue tracker http://issues.infrae.com/silva/
(or post a followup to http://issues.infrae.com/silva/issue930
related to that issue.)
I would propose to close this bug report
(maybe as the new "wontfix"), as this is both a FAQ,
and an issue which cannot be solved reasonably
by Zope itself.
________________________________________
= Request - Entry #1 by csocso on Feb 19, 2004 12:16 pm
Does somebody know how Zope determins the freshness of a page? I just did the following request which showed that our page was modified roughly one year ago which is certainly not true. This is bad if someone wants to cache the page based on the modification timestamp...
Anyway, our page contains not just static but a lot of dynamic content so maybe the root of the problem is that...
-----------
~> telnet www.csg.ethz.ch 80
Trying 129.132.66.4...
Connected to kom7.ethz.ch.
Escape character is '^]'.
HEAD / HTTP/1.1
Host: www.csg.ethz.ch
HTTP/1.1 200 OK
Date: Wed, 18 Feb 2004 17:31:59 GMT
Server: Zope/(Zope 2.6.4rc2 (binary release, python 2.1,
solaris-2.9-sparc), pyt
hon 2.1.3, sunos5) ZServer/1.1b1
Content-Length: 631
Ms-Author-Via: DAV
Content-Type: application/octet-stream
Accept-Ranges: none
Etag:
Last-Modified: Sat, 15 Feb 2003 19:20:35 GMT
Via: 1.1 www.csg.ethz.ch
X-Cache: MISS from www.csg.ethz.ch
----------------
Even worse, that ZOPE can't even compare dates correctly according to HTTP/1.x standard.
--------------
~> telnet www.csg.ethz.ch 80
Trying 129.132.66.4...
Connected to kom7.ethz.ch.
Escape character is '^]'.
HEAD / HTTP/1.1
Host: www.csg.ethz.ch
If-Modified-Since: Wed, 18 Feb 2004 16:00:00 GMT
HTTP/1.1 200 OK
Date: Wed, 18 Feb 2004 17:59:08 GMT
Server: Zope/(Zope 2.6.4rc2 (binary release, python 2.1,
solaris-2.9-sparc), python 2.1.3, sunos5) ZServer/1.1b1
Content-Length: 631
Ms-Author-Via: DAV
Content-Type: application/octet-stream
Accept-Ranges: none
Etag:
Last-Modified: Sat, 15 Feb 2003 19:20:35 GMT
Via: 1.1 www.csg.ethz.ch
X-Cache: MISS from www.csg.ethz.ch
--------------
--> According to HTTP/1.1 RFC it SHOULD return a 304 (Not Modified) response.
Cheers,
Csocso
==============================================================
More information about the Zope-Collector-Monitor
mailing list