Christian Biesinger wrote:


Hm... darin: isn't nsEmbedString replaced by other string classes (nsString) on trunk?



Yes, but nsEmbedString is still supported. More importantly, the nsString provided by the Gecko SDK is not exactly the same as the nsString provided internally to the Mozilla codebase.



This is actually better than doing the string conversion/comparison myself, as when the URI is built, it appears to replace 'space' with %20 so my comparison was failing (I was using system libraries on mac to convert from UTF-8 to UTF-16 and then compare. Of course I'd rather use the platform-independent solution).


Ah, yes. There's also another question: Are http://foo:80/ and http://foo/ equal? Since it's the default port, they really are. I think the nsIURI functions handle this.


Yes, when you generate a nsIURI from a URI string, the result is canonicalized. In other words, we fixup the default port, lowercase the hostname (or handle IDN), convert to the "origin charset" if necessary, and apply escaping rules, etc. One thing we do not do is unescape anything. So, "http://foo/%41"; is not treated as equal to "http://foo/A";. In practice, this hasn't been much of an issue since web servers treat them equally. It's possible that we might want to unescape anything that doesn't need to be escaped as part of our canonicalization process.

-Darin
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to