summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2019-06-27 11:56:58 +0900
committerjaseg <git@jaseg.net>2019-06-27 11:56:58 +0900
commitb4125a9d73f6eea4b7bfd0251bc96868d26011f3 (patch)
treec44ff14b58ed039d315308511ff5613b05e75c23
parentc75e2e7140e5547778106b4801648e543f037faf (diff)
downloadsecure-download-b4125a9d73f6eea4b7bfd0251bc96868d26011f3.tar.gz
secure-download-b4125a9d73f6eea4b7bfd0251bc96868d26011f3.tar.bz2
secure-download-b4125a9d73f6eea4b7bfd0251bc96868d26011f3.zip
Add logging
-rw-r--r--encrypt.py3
-rw-r--r--server.py1
2 files changed, 2 insertions, 2 deletions
diff --git a/encrypt.py b/encrypt.py
index d89d01c..6998708 100644
--- a/encrypt.py
+++ b/encrypt.py
@@ -46,6 +46,5 @@ if __name__ == '__main__':
for progress in encrypt(args.infile):
pbar.update(progress)
else:
- for _progress in encrypt(args.infile):
- pass
+ *encrypt(args.infile),
diff --git a/server.py b/server.py
index 4d8e4dc..e729761 100644
--- a/server.py
+++ b/server.py
@@ -48,6 +48,7 @@ def download(file_id, token, filename):
response.headers['Content-Range'] = f'bytes {range_start}-{range_end}/{size}'
response.headers['Content-Length'] = range_end - range_start + 1
+ print(f'{request.remote_addr}: {file_id} OK')
response.headers['Accept-Ranges'] = 'bytes'
response.headers['Content-Disposition'] = f'attachment {filename}'
return response