diff options
| -rw-r--r-- | django/views/static.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/views/static.py b/django/views/static.py index f74570c307..28e43ec612 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -47,7 +47,7 @@ def serve(request, path, document_root=None, show_indexes=False): raise Http404, '"%s" does not exist' % fullpath else: mimetype = mimetypes.guess_type(fullpath)[0] - return HttpResponse(open(fullpath).read(), mimetype=mimetype) + return HttpResponse(open(fullpath, 'rb').read(), mimetype=mimetype) DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
