From: Jeremy Kerr Date: Mon, 1 Sep 2008 03:39:34 +0000 (+1000) Subject: Add content-disposition: attachment header to bundle download X-Git-Tag: v0.9.0~358 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5b3f8f1778a7fb744feb755c9e374ea95542f01;p=thirdparty%2Fpatchwork.git Add content-disposition: attachment header to bundle download Signed-off-by: Jeremy Kerr --- diff --git a/apps/patchwork/views/bundle.py b/apps/patchwork/views/bundle.py index 65ca583e..d8c868ee 100644 --- a/apps/patchwork/views/bundle.py +++ b/apps/patchwork/views/bundle.py @@ -135,6 +135,8 @@ def bundle(request, bundle_id): def mbox(request, bundle_id): bundle = get_object_or_404(Bundle, id = bundle_id) response = HttpResponse(mimetype='text/plain') + response['Content-Disposition'] = 'attachment; filename=bundle-%d.mbox' % \ + bundle.id response.write(bundle.mbox()) return response