diff options
Diffstat (limited to 'src/django_pgpmailman/views/list.py')
| -rw-r--r-- | src/django_pgpmailman/views/list.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/django_pgpmailman/views/list.py b/src/django_pgpmailman/views/list.py index f2289b2..4f6d8db 100644 --- a/src/django_pgpmailman/views/list.py +++ b/src/django_pgpmailman/views/list.py @@ -111,9 +111,10 @@ class ListKey(View): raise Http404 key_file = ContentFile(str(key)) response = HttpResponse(key_file, 'application/pgp-keys') - response['Content-Length'] = key_file.size - response[ - 'Content-Disposition'] = 'attachment; filename="%s.asc"' % self.pgp_list.list_id + length = key_file.size + disposition = 'attachment; filename="%s.asc"' % self.pgp_list.list_id + response['Content-Length'] = length + response['Content-Disposition'] = disposition return response |
