[Checkins] SVN: zope.file/trunk/src/zope/file/download.py another
"reuse" change
Gary Poster
gary at zope.com
Wed Nov 22 17:49:25 EST 2006
Log message for revision 71279:
another "reuse" change
Changed:
U zope.file/trunk/src/zope/file/download.py
-=-
Modified: zope.file/trunk/src/zope/file/download.py
===================================================================
--- zope.file/trunk/src/zope/file/download.py 2006-11-22 22:26:36 UTC (rev 71278)
+++ zope.file/trunk/src/zope/file/download.py 2006-11-22 22:49:25 UTC (rev 71279)
@@ -57,7 +57,7 @@
return res
def __init__(self, context, contentType=None, downloadName=None,
- contentDisposition=None):
+ contentDisposition=None, contentLength=None):
if not contentType:
cti = zope.mimetype.interfaces.IContentInfo(context, None)
if cti is not None:
@@ -73,7 +73,9 @@
)
self.headers += ("Content-Disposition", contentDisposition),
- self.headers += ("Content-Length", str(context.size)),
+ if contentLength is None:
+ contentLength = context.size
+ self.headers += ("Content-Length", str(contentLength)),
self.body = bodyIterator(self.getFile(context))
More information about the Checkins
mailing list