improved implementation of Expose, thanks Anthony
This commit is contained in:
@@ -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
@@ -4151,7 +4151,7 @@ class Expose(object):
|
|||||||
def __init__(self,base=None):
|
def __init__(self,base=None):
|
||||||
current.session.forget()
|
current.session.forget()
|
||||||
base = base or os.path.join(current.request.folder,'static','work')
|
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):
|
if not os.path.isdir(filename):
|
||||||
current.response.headers['Content-Type'] = contenttype(filename)
|
current.response.headers['Content-Type'] = contenttype(filename)
|
||||||
raise HTTP(200,open(filename,'rb'),**current.response.headers)
|
raise HTTP(200,open(filename,'rb'),**current.response.headers)
|
||||||
|
|||||||
Reference in New Issue
Block a user