docs: protected boolean redirectMatches(String requestedRedirect, String redirectUri) {
          try {
              URL req = new URL(requestedRedirect);
              URL reg = new URL(redirectUri);
  
              int requestedPort = req.getPort() != -1 ? req.getPort() : req.getDefaultPort();
              int registeredPort = reg.getPort() != -1 ? reg.getPort() : reg.getDefaultPort();
  
              boolean portsMatch = matchPorts ? (registeredPort == requestedPort) : true;
  
              if (reg.getProtocol().equals(req.getProtocol()) &&
                      hostMatches(reg.getHost(), req.getHost()) &&
                      portsMatch) {
                  return StringUtils.cleanPath(req.getPath()).startsWith(StringUtils.cleanPath(reg.getPath()));
              }
          }
          catch (MalformedURLException e) {
          }
          return requestedRedirect.equals(redirectUri);
      }