changeset 4577:bbdcf159f469

backup action: fix emitting headers for werkzeug API
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 14 Feb 2009 23:12:03 +0100
parents 95dc19f1ea75
children ace3bbadf66d
files MoinMoin/action/backup.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/backup.py	Sat Feb 14 22:35:43 2009 +0100
+++ b/MoinMoin/action/backup.py	Sat Feb 14 23:12:03 2009 +0100
@@ -37,8 +37,8 @@
     """ Send compressed tar file """
     dateStamp = time.strftime("%Y-%m-%d--%H-%M-%S-UTC", time.gmtime())
     filename = "%s-%s.tar.%s" % (request.cfg.siteid, dateStamp, request.cfg.backup_compression)
-    request.headers.add('Content-Disposition', '%s; filename="%s"' %
-                        ('application/octet-stream', filename))
+    request.content_type = 'application/octet-stream'
+    request.headers.add('Content-Disposition', 'inline; filename="%s"' % filename)
     tar = tarfile.open(fileobj=request, mode="w|%s" % request.cfg.backup_compression)
     # allow GNU tar's longer file/pathnames
     tar.posix = False