~edwargix/git.sr.ht

9f25cf336e2078e7ceb3a7f1fc84761f52d9e380 — Drew DeVault 6 years ago dcda650
api: always pass filename to send_file

Flask will raise a TypeError if the None branch of this condition was
taken.
1 files changed, 1 insertions(+), 1 deletions(-)

M gitsrht/blueprints/api.py
M gitsrht/blueprints/api.py => gitsrht/blueprints/api.py +1 -1
@@ 224,7 224,7 @@ def repo_blob_GET(username, reponame, ref, path):

        return send_file(BytesIO(blob.data),
                as_attachment=blob.is_binary,
                attachment_filename=entry.name if entry else None,
                attachment_filename=entry.name if entry else blob.id.hex + ".bin",
                mimetype="text/plain" if not blob.is_binary
                    else "application/x-octet-stream")