Remove the rule that "://" means a standard URL. This fixes a number of bugs
and layout tests. The only thing we use now to determine whether a scheme is
standard scheme is whether it is on a known list.
Fix some bugs around setting protocols. Previously, we wouldn't reparse the
entire URL, which would give weird results in some cases, since which part
actually gets replaced changes if you change the protocol. This change has us
replace the protocol, then completely reparse the URL which ensures we don't
miss any edge cases. It is a bit slower, but changing the protocol is very
This differs from KURL in several cases. On the
layout test, we fail setting a hostname on a URL with "foo" protocol because we
no longer treat a "foo" URL as a standard protocol. However, this matches
Firefox's behavior, so I think there should not be compat problems.
Other differences in that test are that we allow setting hosts with spaces in
them for IE compat, and that when we generate the URL "c:/path/testurl.html" on
Windows, we reinterpret that as a file URL to file:///C:/path/testurl.html.
This is how "c:/path/testurl.html" would be interpreted if we just found it on
a page, so I think this behavior is correct, even though no other browser does
this (our handling of these generally matches IE, but it fails to set a "c"
protocol with an exception in this case).