forked from expo/troggle
Now the servers locale is utf8, try opening files spectifying path using a text string
This commit is contained in:
parent
f0a9c33795
commit
836387057a
@ -226,7 +226,7 @@ def expopage(request, path):
|
|||||||
filetobeopened = os.path.normpath(expowebpath / path)
|
filetobeopened = os.path.normpath(expowebpath / path)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
content = open(filetobeopened.encode(sysdefaultencoding), "rb")
|
content = open(filetobeopened, "rb")
|
||||||
content_type=getmimetype(path)
|
content_type=getmimetype(path)
|
||||||
return HttpResponse(content = content, content_type=content_type)
|
return HttpResponse(content = content, content_type=content_type)
|
||||||
except IOError:
|
except IOError:
|
||||||
|
Loading…
Reference in New Issue
Block a user