and path with self.path, substitute the result for current_uri. call the function urljoin with arguments current_uri and location, substitute the result for location.
location = urljoin ( current_uri , location )