From 2eac09691b53f02bf73e6bfce0cca14e095401c4 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 10 Oct 2017 17:39:29 +0200 Subject: [PATCH] fix fallback --- pandora/oxdjango/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/oxdjango/http.py b/pandora/oxdjango/http.py index aa76a651..7a69dce6 100644 --- a/pandora/oxdjango/http.py +++ b/pandora/oxdjango/http.py @@ -40,7 +40,7 @@ def HttpFileResponse(path, content_type=None, filename=None): response['Content-Type'] = content_type response['Content-Length'] = os.stat(path).st_size else: - response = HttpResponse(open(path), content_type=content_type) + response = HttpResponse(open(path, 'rb'), content_type=content_type) if filename: if not isinstance(filename, bytes): filename = filename.encode('utf-8')