[Zope-CMF] [dev] Document.get_size considered dumb
Paul Winkler
pw_lists at slinkp.com
Wed Sep 22 13:50:21 EDT 2004
On Wed, Sep 22, 2004 at 10:56:56AM -0400, Tres Seaver wrote:
> I would like to modify the implementation of
> Products.CMFDefault.Document.get_size as follows:
>
>
> --- CMFDefault/Document.py 7 Sep 2004 08:47:54 -0000 1.69.2.2
> +++ CMFDefault/Document.py 22 Sep 2004 14:53:13 -0000
> @@ -415,6 +415,6 @@
> security.declareProtected(View, 'get_size')
> def get_size( self ):
> """ Used for FTP and apparently the ZMI now too """
> - return len(self.manage_FTPget())
> + return len(self.text)
>
> InitializeClass(Document)
>
> The current behavior tries to ensure that 'get_size' returns exactly the
> same value as the length of the decorated source text. The only
> dependent I know of for that behavir is webdav's HEAD; I have no
> problem with "breaking" that, because there is no guarantee that HEAD
> and GET will return the same values between two requests, anyway.
>
> Are there any other clients out there who care about 'get_size'? If
> noone objects, I will check it in on Friday (I may make the size cached,
> as well).
Not really objecting, but what's the motivation for changing it?
performance?
--
Paul Winkler
http://www.slinkp.com
More information about the Zope-CMF
mailing list