True if the URL starts with {@code http://} or {@code https://}.

@since 4.0.0
556091
public static boolean isHttp(String url) {
		if (url.length() < 7 || !url.startsWith("http")) {
			return false;
		}
		int i = 4; // "http"
		if (url.charAt(i) == 's') {
			i++;
		}
		return url.startsWith("://", i);
	}
599263
protected boolean excluded(String url) {
        for (final Pattern urlPattern : this.excludedUrls) {
            final Matcher matcher = urlPattern.matcher(url);
            if (matcher.matches()) {
                if (this.logger.isDebugEnabled()) {
                    this.logger.debug("Exclude pattern " + urlPattern.pattern() + " matches " + url);
                }
                return true;
            }
        }
        
        return false;
    }
911993
public static boolean validateUrl(String url) {
        String[] schemes = {"https"};
        UrlValidator urlValidator = new UrlValidator(schemes);
        return urlValidator.isValid(url);
    }
1081932
function(context) {

            // Check path
            var path = context.request.urlInfo.pathname;

            if (path.indexOf(this.$.path) === 0) {
                // path matches
                if (this.$.route !== null) {
                    return (new RegExp(this.$.route, "i")).test(path);
                }

                return true;
            }

            return false;
        }
1219425
public String applyOnURL(String url) {
        if (StringUtils.isBlank(url)) {
            return url;
        }
        return StringUtils.substringBefore(url, "?") + toString();
    }
589598
public boolean shouldRedirectToHttps(WebRequest webRequest) {
        HttpServletRequest req = webRequest.getHttpServletRequest();
        return !req.isSecure() && webRequest.isSSLRequired();
    }
627549
public boolean isHttpError() {
		if (isRevisitDigest() && (getDuplicatePayload() != null)) {
			return getDuplicatePayload().isHttpError();
		}
		String httpCode = getHttpCode();
		return (httpCode.startsWith("4") || httpCode.startsWith("5"));
	}
678360
boolean isRootRequest(HttpServletRequest request) {
        String path = request.getPathInfo();
        if (StringUtils.isBlank(path)) {
            return true;
        } else if (StringUtils.equals("/", path)) {
            return true;
        }
        return false;
    }
602851
private boolean simpleReturn(CmsSSLMode mode) {

        if (m_server.getValue() == null) {
            return true;
        }

        if (mode != null) {

            if (mode.equals(CmsSSLMode.NO)) {
                if (((CmsSite)m_server.getValue()).getUrl().contains("http:")) {
                    return true;
                }
            } else {
                if (((CmsSite)m_server.getValue()).getUrl().contains("https:")) {
                    return true;
                }
            }
        }
        return false;
    }
1215956
function(url) {

        // Note: this is rudamentary.. not sure yet if it handles every case.
        if (/^https?:\/\//i.test(url)) {
            // absolute
            return url;
        }

        var baseParts = this.parseUrl(this.baseUrl);
        if (url.charAt('/')) {
            // Url starts with a slash
            return baseParts.root + url;
        }

        // Url does not start with a slash, we need grab the base url right up until the last slash.
        var newUrl = baseParts.root + '/';
        if (baseParts.path.lastIndexOf('/')!==-1) {
            newUrl = newUrl = baseParts.path.subString(0, baseParts.path.lastIndexOf('/')) + '/';
        }
        newUrl+=url;
        return url;

    }
1183817
function (url) {
        if (_.isEmpty(url)) {
            return false;
        }

        // convert url strings to Url
        (typeof url === STRING) && (url = new Url(url));

        // this ensures we don't proceed any further for any protocol
        // that is not https
        if (url.protocol !== HTTPS) {
            return false;
        }

        // test the input url against allowed matches
        return this.matches.test(url);
    }
651636
public static boolean isSimonUrl(String url) {
		return url != null && url.toLowerCase().startsWith(SimonConnectionConfiguration.URL_PREFIX);
	}
525610
public static boolean isExtensionMatch(String uriName, String urlPattern) {
        if (urlPattern.startsWith("*.")) {
            String ext = urlPattern.substring(1);
            if (uriName.endsWith(ext)) {
                return true;
            }
        }
        return false;
    }
142165
static boolean isPrefixEqual(String aUrlStr, String bUrlStr)
  throws MalformedURLException
  {
    URL aUrl = new URL(aUrlStr);
    URL bUrl = new URL(bUrlStr);
    int aPort = aUrl.getPort();
    int bPort = bUrl.getPort();
    if (aPort == -1 && "https".equals(aUrl.getProtocol()))
    {
      // default port number for HTTPS
      aPort = 443;
    }
    if (bPort == -1 && "https".equals(bUrl.getProtocol()))
    {
      // default port number for HTTPS
      bPort = 443;
    }
    // no default port number for HTTP is supported.
    return aUrl.getHost().equalsIgnoreCase(bUrl.getHost()) &&
           aUrl.getProtocol().equalsIgnoreCase(bUrl.getProtocol()) &&
           aPort == bPort;
  }
610610
public boolean startsWith(byte[] prefix) {
        if ((prefix.length == 0) || (prefix.length > size())) {
            // no match would be possible
            return false;
        }
        boolean match = true;
        int i = 0;
        int j = this.currentReadPosition;
        while (match && (i < prefix.length)) {
            if (this.buffer[j] != prefix[i]) {
                match = false;
            }
            i++;
            j = (j + 1) % this.buffer.length;
        }
        return match;
    }
707487
public boolean hasToolPathForUrl(String url) {

        List<String> toolPaths = m_urls.getObjectList(url);
        return ((toolPaths != null) && !toolPaths.isEmpty());
    }
1347449
protected boolean shouldIgnorePath(String requestUri) {
        for (String path : router.getIgnorePaths()) {
            if (requestUri.startsWith(path)) {
                return true;
            }
        }

        return false;
    }