comparison src/server/server.py @ 1099:ea0d41ef3719

server: return absolute page in checkRedirection
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 16:00:48 +0200
parents 01e95ec9df9e
children 5976dcd42591
comparison
equal deleted inserted replaced
1098:01e95ec9df9e 1099:ea0d41ef3719
1890 url_parts = url.strip(u'/').split(u'/') 1890 url_parts = url.strip(u'/').split(u'/')
1891 for idx in xrange(len(url), 0, -1): 1891 for idx in xrange(len(url), 0, -1):
1892 test_url = u'/' + u'/'.join(url_parts[:idx]) 1892 test_url = u'/' + u'/'.join(url_parts[:idx])
1893 if test_url in inv_redirections: 1893 if test_url in inv_redirections:
1894 rem_url = url_parts[idx:] 1894 rem_url = url_parts[idx:]
1895 return u'/'.join([inv_redirections[test_url]] + rem_url) 1895 return os.path.join(
1896 u'/',
1897 u'/'.join([inv_redirections[test_url]] + rem_url))
1896 return url 1898 return url
1897 1899
1898 ## Sessions ## 1900 ## Sessions ##
1899 1901
1900 def purgeSession(self, request): 1902 def purgeSession(self, request):