1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-13 22:57:39 +00:00

Merge all headers to download response

Updated test results
This commit is contained in:
OzzieIsaacs
2020-05-10 14:58:18 +02:00
parent fe88010a72
commit 92db00692a
2 changed files with 48 additions and 34 deletions

View File

@@ -609,7 +609,9 @@ def do_download_file(book, book_format, data, headers):
# ToDo: improve error handling
log.error('File not found: %s', os.path.join(filename, data.name + "." + book_format))
response = make_response(send_from_directory(filename, data.name + "." + book_format))
response.headers = headers
# ToDo Check headers parameter
for element in headers:
response.headers[element[0]] = element[1]
return response
##################################