

def rewrite_link(self, link):
    if (not absolute_http_url_re.match(link)):
        if link.startswith('/'):
            link = link[1:]
        absolute_path = self.absolute_path
        if self.absolute_path.endswith('/'):
            absolute_path = absolute_path[1:]
        return normalize(absolute_path, link)
    return link

dataset/ETHPy150Open benoitc/dj-revproxy/revproxy/filters.py RewriteBase.rewrite_link/original