From: Jeremy Kerr Date: Mon, 1 Sep 2008 03:39:34 +0000 (+1000) Subject: Add content-disposition: attachment header to bundle download X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=commitdiff_plain;h=e5b3f8f1778a7fb744feb755c9e374ea95542f01 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 65ca583..d8c868e 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