plone / plone.dexterity

Base framework for building content types, both through-the-web and as filesystem code for Zope (CMF/Plone)
https://pypi.org/project/plone.dexterity
22 stars 25 forks source link

Plone 6: WebDAV _data is broken #162

Open Rudd-O opened 2 years ago

Rudd-O commented 2 years ago

As per https://github.com/plone/plone.dexterity/blob/master/docs/WebDAV.txt , any request on folderish/_data should return RFC822 formatted properties of the object in question.

This is not the case in Plone 6 alpha -- instead, the HTML of the rendered view page is returned.

Another noteworthy thing: files downloaded using DAV clients are not returned in RFC822 format -- the raw data is returned instead (much like Zope does when objects are retrieved using DAV clients). Admittedly this is nicer and I would have written code to disable the RFC822 thing anyway, but you should know that in plone 6, there is a difference in behavior from the documented one.

Rudd-O commented 2 years ago

Interestingly enough, I added some printfs() in plone/dexterity/browser/traversal.py, and I can verify that DexterityPublishTraverse.publishTraverse() is in fact being called.

I thought you might want to know all of this, given we are so close to releasing Plone 6, and we probably should not release it with this bug.

Rudd-O commented 2 years ago

Note that caching being on or off does not affect the not-as-documented behavior of the Dexterity publisher.

I am using the latest Plone alpha.

Rudd-O commented 2 years ago
>>> import plone.dexterity.bbb
>>> plone.dexterity.bbb.HAS_WEBDAV
True
Rudd-O commented 2 years ago

OK, I have done the following changes to my configuration (of course, through buildout):

# added to zope.conf
webdav-source-port 8081

and I now attempt to request the _data file -- and this works fine!

Perhaps webdav.txt needs to be amended with this information.

_data should also not be served at all, especially not as rendered HTML view, if WebDAV is not enabled via webdav-source-port.

aadarsh-nagrath commented 1 year ago

Hm.... maybe there is a bug in Plone 6 alpha where the Dexterity publisher does not return RFC822 formatted properties of the object in question, as documented in the WebDAV.txt file. Instead, the HTML of the rendered view page is returned.