[Zope-Checkins] CVS: Zope/lib/python/webdav - EtagSupport.py:1.8.4.1 NullResource.py:1.38.4.3 Resource.py:1.52.4.3
Chris McDonough
chrism@zope.com
Sat, 28 Sep 2002 21:41:11 -0400
Update of /cvs-repository/Zope/lib/python/webdav
In directory cvs.zope.org:/tmp/cvs-serv16902/lib/python/webdav
Modified Files:
Tag: chrism-install-branch
EtagSupport.py NullResource.py Resource.py
Log Message:
Merge chrism-install-branch with head. Apologies for the spew.
=== Zope/lib/python/webdav/EtagSupport.py 1.8 => 1.8.4.1 ===
--- Zope/lib/python/webdav/EtagSupport.py:1.8 Wed Aug 14 18:11:40 2002
+++ Zope/lib/python/webdav/EtagSupport.py Sat Sep 28 21:40:39 2002
@@ -66,9 +66,11 @@
"""
__implements__ = (EtagBaseInterface,)
- def http__etag(self):
+ def http__etag(self, readonly=0):
try: etag = self.__etag
except AttributeError:
+ if readonly: # Don't refresh the etag on reads
+ return
self.http__refreshEtag()
etag = self.__etag
return etag
=== Zope/lib/python/webdav/NullResource.py 1.38.4.2 => 1.38.4.3 ===
=== Zope/lib/python/webdav/Resource.py 1.52.4.2 => 1.52.4.3 ===
--- Zope/lib/python/webdav/Resource.py:1.52.4.2 Mon Sep 16 02:00:55 2002
+++ Zope/lib/python/webdav/Resource.py Sat Sep 28 21:40:40 2002
@@ -167,7 +167,9 @@
mtime=rfc1123_date(self._p_mtime)
RESPONSE.setHeader('Last-Modified', mtime)
if hasattr(aq_base(self), 'http__etag'):
- RESPONSE.setHeader('Etag', self.aq_base.http__etag())
+ etag = self.http__etag(readonly=1)
+ if etag:
+ RESPONSE.setHeader('Etag', etag)
RESPONSE.setStatus(200)
return RESPONSE