response headers to string

This commit is contained in:
Achilles Rasquinha 2018-03-08 20:38:18 +05:30
parent bc702c6c00
commit 4b5e7d80dd

View file

@ -162,7 +162,7 @@ def send_private_file(path):
if frappe.local.request.headers.get('X-Use-X-Accel-Redirect'):
path = '/protected/' + path
response = Response()
response.headers[b'X-Accel-Redirect'] = frappe.utils.encode(path)
response.headers['X-Accel-Redirect'] = frappe.utils.encode(path)
else:
filepath = frappe.utils.get_site_path(path)