improved implementation of Expose, thanks Anthony

This commit is contained in:
Massimo Di Pierro
2012-02-21 16:26:10 -06:00
parent b3702a3bfd
commit 620c61b51a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-02-21 14:03:59) stable
Version 1.99.4 (2012-02-21 16:25:39) stable
+1 -1
View File
@@ -4151,7 +4151,7 @@ class Expose(object):
def __init__(self,base=None):
current.session.forget()
base = base or os.path.join(current.request.folder,'static','work')
filename = os.path.join(base,'/'.join(current.request.args))
filename = os.path.join(base,*current.request.args)
if not os.path.isdir(filename):
current.response.headers['Content-Type'] = contenttype(filename)
raise HTTP(200,open(filename,'rb'),**current.response.headers)