##// END OF EJS Templates
hgweb: make code to join url path simpler...
Yuya Nishihara -
r10675:3c05ecff stable
parent child Browse files
Show More
@@ -229,9 +229,7 b' class hgwebdir(object):'
229 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
229 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
230 if req.env['SCRIPT_NAME']:
230 if req.env['SCRIPT_NAME']:
231 parts.insert(0, req.env['SCRIPT_NAME'])
231 parts.insert(0, req.env['SCRIPT_NAME'])
232 m = re.match('((?:https?://)?)(.*)', '/'.join(parts))
232 url = re.sub(r'/+', '/', '/'.join(parts) + '/')
233 # squish repeated slashes out of the path component
234 url = m.group(1) + re.sub('/+', '/', m.group(2)) + '/'
235
233
236 # update time with local timezone
234 # update time with local timezone
237 try:
235 try:
General Comments 0
You need to be logged in to leave comments. Login now