dfaure at klaralvdalens-datakonsult.se
Tue Feb 11 12:36:34 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Monday 10 February 2003 02:23, Dawit A. wrote:
> Currently KURL does not correctly deal with opaque (non-heirarchical) urls. An
> example of such url is "mailto:". Currently all opaque urls are treated just
> like absoulte path based hierarchical urls, i.e. like the "file:"
> protocol/scheme. This however is completely wrong according to the
> specifications in RFC 2396. The characters allowed in opaque urls is
> different from what is allowed in paths.
So it's only the parser part that should be fixed, no?
I don't see why fixing the parser also means changing the public behaviour of KURL.
> We should not expect a programmer to
> invoke path() to retrieve the opaque part of such urls when by definition
> they can/do not have paths at all!
> The attached patch is meant to fix this problem without breaking current
> functionality. As such it has backwards compatibility for using path() to
> return the opaque section. The proper way to check for such URLs however is
> using the newly added isOpaque() function and calling host() to get the
> opaque section. Calling host() might be questionable as well, but that IMHO
> is more appropriate than storing it in the path component.
Why? You say it's better, but I don't see why host() is better than path()
in mailto:foo. It's really a matter of definition, and KURL defined that one calls
path to get 'foo'. It works, I see no reason for changing it.
> BTW, this fix passes all the tests in kurltest, except the two local url once
> that have been marked "Broken stuff". A patch to comment those out is
> attached as well.
Those are tests for broken urls, but the tests actually passed, so it is a regression
if such urls are not handled the same anymore.....
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Klarälvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the kde-core-devel