url = new URL(location);
} catch (MalformedURLException e) {
return (false);
}
// Does this URL match down to (and including) the context path?
if (!request.scheme().equalsIgnoreCase(url.getProtocol()))
return (false);
if (!request.serverName().equalsIgnoreCase(url.getHost()))
return (false);
// Set the URL port to HTTP default if not available before comparing
int urlPort = url.getPort();