django-sendfile
django-sendfile copied to clipboard
Content-Disposition: Output contains buffer repr (Python 3.4)
With Python 3.4, the Content-Disposition created by:
sendfile(request, path, attachment=True, attachment_filename='export.zip')
django-sendfile 0.3.10 is:
attachment; filename="b'export.zip'"; filename*=UTF-8''export.zip
(The call to str.encode() now returns a byte object: https://github.com/johnsensible/django-sendfile/blob/master/sendfile/init.py#L80)
django-sendfile 0.3.9 is (desired):
'attachment; filename="export.zip"'
I have no experience with writing python 2/3 compatible code so I have not attempted to create a pull request, yet.
Thanks for your work!
Hi @nuarhu and others
So I have been looking at this issue and from my understanding since filenames* store quoted values and filenames* is always given priority over filename (From reading docs here) this should always be working correctly. Am I missing something here?