]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/views/bundle.py
Add content-disposition: attachment header to bundle download
[patchwork] / apps / patchwork / views / bundle.py
index 65ca583ef8d1d26804e928ca7b69e18d826f80e5..d8c868eee64ac5bdc2b8a041ae213de42133c9a7 100644 (file)
@@ -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