public static String getPathFromURL(String url) {
		String schemeEnd = "://";
		int ind = url.indexOf(schemeEnd);
		if (ind == -1) {
			return url;
		}

		url = url.substring(schemeEnd.length());
		for (int i = 0; i < url.length(); i++) {
			char currentChar = url.charAt(i);
			if (currentChar == '/' || currentChar == '?' || currentChar == '#') {
				return url.substring(i);
			}
		}
		return "/";
	}
Added for ngrinder.
Handle different branch concept in svn and github.
ngrinder-controller/src/main/java/org/tmatesoft/svn/core/internal/io/dav/DAVUtil.java