The list of methods to do URL Normalize are organized into topic(s).
String
normalize(final String taintedURL) normalize
return taintedURL.trim()
.replaceAll(SPACES, DASH)
.replaceAll(CODES, EMPTY)
.replaceAll(SPECIAL_CHARS, EMPTY).toLowerCase();
String
normalize(String absoluteURL) This method removes "."
if (absoluteURL == null) {
return absoluteURL;
if (absoluteURL.indexOf('.') < 0) {
return absoluteURL;
Stack tokens = new Stack();
StringTokenizer st = new StringTokenizer(absoluteURL, URL_PATH_SEP_STR, true);
...
String
normalize(String url) Normalizes a given URL by applying URI#normalize() , removing trailing "/" and making sure the path part starts with "/".
String pathSeparator = "/";
URI uri = new URI(url);
uri = uri.normalize();
String path = uri.getPath();
if (!path.startsWith(pathSeparator)) {
path = pathSeparator + path;
if (path.endsWith(pathSeparator)) {
...
String
normalize(String url) normalize
if (null == url) {
return null;
if (!url.startsWith("http://")) {
return normalize("http://" + url);
URL u;
try {
...
String
normalize(String url_str) normalize
url_str = clean(url_str);
url_str = removewww(url_str);
url_str = translateWhiteSpaces(url_str);
return url_str;
URL
normalize(URL u) normalize an URL,
String proto = u.getProtocol().toLowerCase();
String host = u.getHost().toLowerCase();
int port = u.getPort();
if (port != -1) {
if (url_defport != null) {
try {
int udp;
udp = ((Integer) url_defport.invoke(u, (Object[]) null)).intValue();
...
URL
normalize(URL url) normalize
String stringUrl = url.toString();
if (!"/".equals(stringUrl.substring(stringUrl.length() - 1))) {
stringUrl += "/";
return new URL(stringUrl);
URL
normalize(URL url) normalize
try {
File file = toFile(url);
if (file != null) {
return file.toURI().toURL();
} else {
return toURI(url).toURL();
} catch (MalformedURLException e) {
...