PATCH: KURL
Dawit A.
adawit at kde.org
Mon Feb 10 01:23:10 GMT 2003
Hi,
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. 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.
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.
Regards,
Dawit A.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kurl2.diff
Type: text/x-diff
Size: 5710 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030210/ff981904/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kurltest.diff
Type: text/x-diff
Size: 983 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030210/ff981904/attachment-0001.diff>
More information about the kde-core-devel
mailing list