In KURL.h setPort has the following comment: // Setting the port to 0 will clear any port from the URL. void setPort(unsigned short); But passing 0 sets port to :0 instead.
Created attachment 27765 [details] proposed fix
Comment on attachment 27765 [details] proposed fix r=me > + Make setPort remove port if 0 is given to it, as promissed by the Typo: should be "promised". > // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations, > // and to avoid changing more than just the port. Oops, this FIXME is totally bogus - this method takes a number, so there is no need to encode it! Please feel free to remove it if you wish. > + if (!i) We'd normally put the normal code path first (if (i)).
Landed in r41076.