def METHOD_NAME(path, start_response, proxy_url):
    # pylint:disable=too-many-locals
    if '://' not in path:
        path = 'http://' + path
    try:
        try:
            response = urllib2.urlopen(path)
        except urllib2.HTTPError as ex:
            response = ex
        print('%s: %s %s' % (path, response.code, response.msg))
        # Beginning in Python 3.8, headers aren't guaranteed to arrive in
        # lowercase; we must do so ourself.
        headers = [(k, v) for (k, v) in response.headers.items() if k.lower() not in DROP_HEADERS]
        scheme, netloc, path, _params, _query, _fragment = urlparse(path)
        host = (scheme or 'http') + '://' + netloc
    except Exception as ex: # pylint:disable=broad-except
        sys.stderr.write('error while reading %s:\n' % path)
        traceback.print_exc()
        tb = traceback.format_exc()
        start_response('502 Bad Gateway', [('Content-Type', 'text/html')])
        # pylint:disable=deprecated-method
        error_str = escape(str(ex) or ex.__class__.__name__ or 'Error')
        error_str = '<h1>%s</h1><h2>%s</h2><pre>%s</pre>' % (error_str, escape(path), escape(tb))
        return [_as_bytes(error_str)]
    else:
        print("Returning", headers)
        start_response('%s %s' % (response.code, response.msg), headers)
        data = response.read()
        data = fix_links(data, proxy_url, host)
        return [data]