Fix filename for subunit downlaods.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 4 Dec 2010 03:19:40 +0000 (04:19 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 4 Dec 2010 03:19:40 +0000 (04:19 +0100)
buildfarm/web/__init__.py

index c05e6c1..e53f684 100755 (executable)
@@ -989,7 +989,8 @@ class BuildFarmApp(object):
                     yield "".join(page.render(myself, build, True))
                 elif subfn == "+subunit":
                     start_response('200 OK', [
-                        ('Content-type', 'text/x-subunit; charset=utf-8')])
+                        ('Content-type', 'text/x-subunit; charset=utf-8'),
+                        ('Content-Disposition', 'attachment; filename="%s.%s.%s-%s.subunit"' % (build.tree, build.host, build.compiler, build.revision))])
                     try:
                         yield build.read_subunit().read()
                     except NoTestOutput: