Commit 024a0f59 by murtaugh

redirect error with accented urls

parent bd0dd6a4
Showing with 7 additions and 2 deletions
......@@ -100,13 +100,18 @@ def maker (path, queue):
# Check if output now exists, if so redirect to it
# If not (phony target?) Just show the output
if 'target' in req:
rurl = "/"+os.path.relpath(req['cwd'], path)+"?lastbuild={0}".format(datetime.datetime.now().isoformat())
rurl = "/"+os.path.relpath(req['cwd'], path)
rurl = urllib.quote(rurl)
rurl += "?lastbuild={0}".format(datetime.datetime.now().isoformat())
print ("Make successful (target). Redirecting to {0}".format(rurl))
redirect_body = redirectTo(rurl, req['request'])
req['request'].write(redirect_body)
req['request'].finish()
elif os.path.exists(os.path.join(req['cwd'], req['path'])):
rurl = "/"+os.path.relpath(req['path'], path)+"?lastbuild={0}".format(datetime.datetime.now().isoformat())
rurl = "/"+os.path.relpath(req['path'], path)
# aug 2017: escape accents
rurl = urllib.quote(rurl)
rurl += "?lastbuild={0}".format(datetime.datetime.now().isoformat())
print ("Make successful. Redirecting to {0}".format(rurl))
redirect_body = redirectTo(rurl, req['request'])
req['request'].write(redirect_body)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment