Hi!
I want to bring some bugs to your attention which deal with the lovely
problem of standards versus compatibility:
1. \ to / conversion:
bug 32895 [RFC 2616 $2.4.3 non-compliance?]
http://bugzilla.mozilla.org/show_bug.cgi?id=32895
bug 34239 [cleanup - stop converting \ to / for win32 url parsing]
http://bugzilla.mozilla.org/show_bug.cgi?id=34239
Currently we are converting \ to / during urlparsing of the directory
section on win/os2 to deal with websites that use \ instead of / as path
delimiter. / is the only allowed path delimiter and \ is just another
character. Currently we break RFC 2616 and more badly we do it platform
dependend.
I think a decision has to be made that is XP. We should either convert
on all platforms or not. For the moment I think we should remove the
conversion in the urlparser. This would make us comply with RFC 2616,
but be aware that this will break some links in some sites. Some work
for evangelism.
There are still other places where we do this conversion and we do it
for a good reason. Conversion from/to file urls do it depending on the
platform and in WebShell/DocShell we do such an conversion if we detect
a local file path in the urlbar. All this is there for a good reason and
should stay. We could even put in some stuff in the url-fixup code on
the docshell/webshell level when a link with \ in it fails and then do a
conversion, but deep down in the urlparser this conversion is at the
wrong place.
2. RFC 2396 versus RFC 1808
Here we have not only a compatibility issue but also conflicting standards.
bug 78206 [a href="?xyz" does wrong thing]
http://bugzilla.mozilla.org/show_bug.cgi?id=78206
bug 90439 [relative queries from cgi broken]
http://bugzilla.mozilla.org/show_bug.cgi?id=90439
From RFC 1808 to RFC 2396 the handling of relative urls changed in some
way:
Given a base url like: "http://www.foo.bar/path/file;param?query#ref"
and the following relative urls with RFC 1808 result in:
";param2" "http://www.foo.bar/path/file;param2" (5.1)
"?query2" "http://www.foo.bar/path/file;param?query2" (5.1)
"" "http://www.foo.bar/path/file;param?query#ref" (5.2)
and with RFC 2396 result in:
";param2" "http://www.foo.bar/path/;param2" (C.1)
"?query2" "http://www.foo.bar/path/?query2" (C.1)
"" "http://www.foo.bar/path/file" (C.2)
RFC 2396 obsoletes RFC 1808, so everything should be clear, but there is
a compatibility issue here:
IE has always done it the RFC 1808 way except for "" which was resolved
as "http://www.foo.bar/path" (as has mozilla prior to 0.9.2, bug 78206),
NN4 has done it differently ("" as IE does, the rest as RFC 2396,
this is also the current behaviour of mozilla). Opera is fully compliant
with RFC 2396.
See http://www.hixie.ch/tests/adhoc/uri/001.html for a test and results.
To get the current NN4/IE/moz behaviour on the "" handling you can
always use "./". Maybe Ian can extend his testpage for this?
So we already have different implementations. This means that authors
cannot rely on either behaviour, and therefore we might as well do it
right. The only problem is that the most non compliant browser is the
one with the biggest market share.
If we fully comply with RFC2396 (do the right thing with "") we will be
compatible with NN4 in the ?/; issue, but not with the "" issue. We are
currently incompatible with IE on the ;/? issue and will then also be on
the "" issue.
Of course we can also dump the standards RFC 2396 (and 1808!) and be
fully compatible with IE on these issues.
The debate has been going on for some time and I think we need a
decision on these issues before moz 1.0, better moz 0.9.4.
I wanted to make these issues more public to get more input on which way
to go.
Comments please ...
Andreas