public class BasicURLCanonicalizer extends Object implements URLCanonicalizer
This class differs from google in treatment of non-ascii input. Google's rules don't really address this except with one example test case, which seems to suggest taking raw input bytes and pct-encoding them byte for byte. Since the input to this class consists of java strings, not raw bytes, that wouldn't be possible, even if deemed preferable. Instead BasicURLCanonicalizer expresses non-ascii characters pct-encoded UTF-8.
| Constructor and Description |
|---|
BasicURLCanonicalizer() |
| Modifier and Type | Method and Description |
|---|---|
String |
attemptIPFormats(String host) |
void |
canonicalize(HandyURL url) |
String |
decode(String input) |
String |
escapeOnce(String input) |
int |
getHex(int b) |
String |
minimalEscape(String input) |
String |
normalizePath(String path) |
String |
unescapeRepeatedly(String input) |
protected static Charset |
UTF8() |
protected static Charset _UTF8
public void canonicalize(HandyURL url)
canonicalize in interface URLCanonicalizerprotected static Charset UTF8()
public int getHex(int b)
Copyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.