Commit 77e3bb9d authored by Sidnei da Silva's avatar Sidnei da Silva

      - webdav.Resource: during COPY, manage_afterClone was called way
        too early, thus the object wasn't bound to the database and
        couldn't find a context. Changed to behave the same way as
        CopySupport.
parent e1b1b897
...@@ -46,10 +46,15 @@ Zope Changes ...@@ -46,10 +46,15 @@ Zope Changes
Bugs fixed Bugs fixed
- webdav.Resource: during COPY, manage_afterClone was called way
too early, thus the object wasn't bound to the database and
couldn't find a context. Changed to behave the same way as
CopySupport.
- RAMCacheManager: opimized performance by using cPickle instead - RAMCacheManager: opimized performance by using cPickle instead
of pickle and by using the highest pickle protocol available of pickle and by using the highest pickle protocol available
instead of using ASCII pickles (patch by Dieter Maurer) instead of using ASCII pickles (patch by Dieter Maurer)
- Collector #631: Image URLs in StructuredText containing port - Collector #631: Image URLs in StructuredText containing port
numbers were not rendered correctly numbers were not rendered correctly
...@@ -95,12 +100,12 @@ Zope Changes ...@@ -95,12 +100,12 @@ Zope Changes
header before it is considered as a possible DoS attack and header before it is considered as a possible DoS attack and
discarded. discarded.
- Collector #1371: added new 'cgi-maxlen' directive to zope.conf - Collector #1371: added new 'cgi-maxlen' directive to zope.conf
to limit the amount of form data being processed by Zope to limit the amount of form data being processed by Zope
to prevent DoS attacks to prevent DoS attacks
- Collector #1407: changed WebDAV display name for objects - Collector #1407: changed WebDAV display name for objects
to title_or_id() to title_or_id()
- the 'trusted-proxy' directive in zope.conf now also accepts - the 'trusted-proxy' directive in zope.conf now also accepts
hostnames instead of IP addresses only (patch by Dieter Maurer) hostnames instead of IP addresses only (patch by Dieter Maurer)
...@@ -126,8 +131,8 @@ Zope Changes ...@@ -126,8 +131,8 @@ Zope Changes
since latin1 is obsolete. since latin1 is obsolete.
- Collector #1566: Installation of Zope on some older Solaris versions - Collector #1566: Installation of Zope on some older Solaris versions
could fail due to a broken "echo" implementation causing the could fail due to a broken "echo" implementation causing the
creation of a borked version.txt file. creation of a borked version.txt file.
- Collector #934: Image and File objects are now always internally - Collector #934: Image and File objects are now always internally
split into small chunks even when initialized from a string. split into small chunks even when initialized from a string.
......
...@@ -366,13 +366,9 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem): ...@@ -366,13 +366,9 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
else: else:
raise Locked, 'Destination is locked.' raise Locked, 'Destination is locked.'
ob=self._getCopy(parent) ob = self._getCopy(parent)
ob.manage_afterClone(ob)
# We remove any locks from the copied object because webdav clients
# don't track the lock status and the lock token for copied resources
ob.wl_clearLocks()
ob._setId(name) ob._setId(name)
if depth=='0' and isDavCollection(ob): if depth=='0' and isDavCollection(ob):
for id in ob.objectIds(): for id in ob.objectIds():
ob._delObject(id) ob._delObject(id)
...@@ -381,6 +377,11 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem): ...@@ -381,6 +377,11 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
self.dav__validate(object, 'DELETE', REQUEST) self.dav__validate(object, 'DELETE', REQUEST)
parent._delObject(name) parent._delObject(name)
parent._setObject(name, ob) parent._setObject(name, ob)
ob = parent._getOb(name)
ob.manage_afterClone(ob)
# We remove any locks from the copied object because webdav clients
# don't track the lock status and the lock token for copied resources
ob.wl_clearLocks()
RESPONSE.setStatus(existing and 204 or 201) RESPONSE.setStatus(existing and 204 or 201)
if not existing: if not existing:
RESPONSE.setHeader('Location', dest) RESPONSE.setHeader('Location', dest)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment