Skip to content

Commit

Permalink
Zope-801 Fixes issue where GET on a binary WebDAV resource returned
Browse files Browse the repository at this point in the history
improper data (empty string instead of the binary data)
  • Loading branch information
zopyx committed Mar 6, 2020
1 parent 05e1038 commit 866f321
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Bug fixes
- Fixed encoding issue of `displayname` WebDAV property
(`#797 <https://github.com/zopefoundation/Zope/issues/797>`_)

- Fixed issue where GET on a binary WebDAV resource returned improper
data (empty string instead of the binary data)
(`#797 <https://github.com/zopefoundation/Zope/issues/801>`_)

Other changes
+++++++++++++
Expand Down
7 changes: 6 additions & 1 deletion src/webdav/Resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,12 @@ def UNLOCK(self, REQUEST, RESPONSE):
def manage_DAVget(self):
"""Gets the document source"""
# The default implementation calls PrincipiaSearchSource
return self.PrincipiaSearchSource()
print('DAV')
import pdb; pdb.set_trace()
try:
return bytes(self)
except TypeError:
return self.PrincipiaSearchSource()

@security.protected(webdav_access)
def listDAVObjects(self):
Expand Down

0 comments on commit 866f321

Please sign in to comment.