Ticket #12343 (confirmed Bug)

Opened 4 years ago

Last modified 3 years ago

Dexterity based types report zero size to WebDAV clients

Reported by: kleist Owned by:
Priority: major Milestone: 4.x
Component: Dexterity Version: 4.1
Keywords: webdav Cc:

Description

Plone 4.2 coredev buildout,  http://good-py.appspot.com/release/dexterity/1.0.3-1

In the response from Plone on a PROPFIND request:

<n:getcontentlength xmlns:n="DAV:">0</n:getcontentlength>

This behavior is a regression compared to AT based types, which do report a non-zero size.

An effect is that the WebDAV client "WebDrive" (South River Technologies) actually forces such a file to become zero sized, i.e. empty. (Arguably, this is a bug of WebDrive; I'll report it to their support team.)

The Cyberduck client opens "zero sized" files without second thoughts.

This horrible kludge in my content-type class works around the problem:

class XMLDocument(dexterity.Item):
    grok.implements(IXMLDocument)

    def get_size(self):
        return 1

Relevant code:

 https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/filerepresentation.py#L59

 https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/content.py#L164

 https://github.com/plone/plone.dexterity/blob/master/plone/dexterity/content.py#L243

See also:

https://dev.plone.org/ticket/8073

https://dev.plone.org/changeset/29982

Change History

comment:1 Changed 4 years ago by kleist

  • Status changed from new to closed
  • Resolution set to invalid

Moved to  http://code.google.com/p/dexterity/issues/detail?id=243 since Dexterity currently is not part of Plone core (but will be in 4.3?).

comment:2 Changed 4 years ago by kleist

  • Status changed from closed to reopened
  • Version set to 4.1
  • Resolution invalid deleted

Moved back from GOOG.

Last edited 3 years ago by kleist (previous) (diff)

comment:3 Changed 4 years ago by kleist

related to #8476 ?

comment:4 Changed 3 years ago by kleist

  • Status changed from reopened to confirmed
Note: See TracTickets for help on using tickets.