To ensure comparability of URLs, all output files MUST use a canonical form for URLs:
CanonicalURL := Protocol "://" Authority Path
[ "?" Query ] [ ":" Port ]
where square brackets ([]) denote optional components that
are only produced if they are present in the URL or differ from the
default. The CanonicalURL string MUST NOT contain extraneous
whitespace - the whitespace in the above definition is present only
for readability. Note that all of the components listed here are
available via methods of the java.net.URL class.