How to be sure to get a canonical URL with KURL

Nicolas Goutte nicolasg at snafu.de
Wed May 18 16:45:23 BST 2005


I have a question for people knowing KURL well.

I am trying to solve bug #105332
(http://bugs.kde.org/show_bug.cgi?id=105332)

To be compatible with the freedesktop.org specification of thumbnails, the 
thumbnail creator (kdelibs/kio/kio/previewjob.*) needs to make a MD5 on a 
absolute and canonical URL.

Previous version of KDE, used file:/ and not file:/// so there were a 
work-around in code, which I think is the main reason for the bug #105332.
That is why I closed it first as WORKFORME, as the code is unneed under KDE 
trunk.

However after reading the KURL Doxygen doc, I am not sure anymore.

There it is told to do encode_string(decode_string(url)) if I have well 
understood. But that does not work, as the : character of the file: is 
encoded too.

So what has to be done? Is using KURL:url() enough for KDE trunk and I should 
close the bug again. Or has something special to be done to get a canonical 
URL? Or perhaps KURL cannot guarantee to create one?

In any case, it seems that it would be nice if KURL would be updated, at least 
the documentation.

Please CC me, as I am not subscribed to kde-core-devel.

Have a nice day!





More information about the kde-core-devel mailing list