Summary: | Support data urls as per rfc2397 | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | lorenzo |
Component: | khtml | Assignee: | Leo Savernik <l.savernik> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | faure |
Priority: | NOR | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
preliminary patch as a kioslave
stand-alone distribution of data protocol (506kB!) proposed changes to KIO::Slave entirety of changes to libkiocore |
Description
lorenzo
2001-03-22 17:22:14 UTC
Taking. I've written a patch that provides data url functionality as a kioslave. If you want to test it look at the patches below. Created attachment 672 [details]
preliminary patch as a kioslave
This patch contains the core of the data protocol implementation.
Created attachment 673 [details]
stand-alone distribution of data protocol (506kB!)
This package is a full source distribution of the data protocol -- implemented
as a kioslave. You can download, compile and install this package separately
without the need to recompile parts of kde.
Beware that it is preliminary and may contain subtle bugs.
And yes, this package is huge! Nearly half a meg. It's the autoconf scripts
that make even the smallest project fat.
Resolving this bug. Be advised that the stand-alone package contains some bugs I have fixed in KDE CVS already. Do not report any bugs on the stand-alone package here. Next strike: Now that data urls are supported by a kioslave, I want to optimize away the need for it. Therefore the idea is to derive from KIO::Slave directly. I realised that some changes to KIO::Slave would be necessary and Waldo Bastian suggested the conversion of some members to virtual by virtual_hook(). See discussion: http://lists.kde.org/?l=kfm-devel&m=104444641401192&w=2 The following attachments contain the preliminary results. Created attachment 892 [details]
proposed changes to KIO::Slave
This patch contains the proposed changes to KIO::Slave to make it extensible.
There are seven methods which have been virtual_hook'ed:
suspend()
resume()
suspended()
send(...) // new
hold()
setHost(...)
setConfig(...)
plus a protected ctor that sets the derived flag so that the virtual_hook is
called properly.
Created attachment 894 [details]
entirety of changes to libkiocore
This patch contains all changes to be made to KIO::Slave and associated classes
to support in-process processing of data urls without the overhead of process
launching.
Changes comprise of:
Makefile.am:
* compile added files
job.cpp:
scheduler.cpp:
* replaced all calls to slave->connection()->send/suspend/resume with
slave->send/suspend/resume
slave.cpp:
slave.h:
* added method send(cmd,data)
* added virtual_hook structures
* modified methods to respect virtual_hook if derived from slave
* added a new constructor which derived classes must use
* added a flag which marks a slave instance to be a base class (d->derived)
* made factory methods take into account the special protocols (for now
there is only "data")
* fixed some typos
dataprotocol.cpp:
dataprotocol.h:
* these are new, they handle the core data protocol functionality
dataslave.cpp:
dataslave.h:
* these are new, serving as an adapter between Slave and DataProtocol
Sorry for the big patch. I wanted to split it up into smaller parts first but
all the changes are interdependant in such a way that a proper compilation is
not possible if parts are missing.
Leo: thanks for the data:// implementation. Can this bug be closed now? Please note that this bug is dependent on bug #62425, to which there is a patch but one that has not been applied. If that other one isn't solved, data: URLs might get garbled, especially those that, by coincidence, the first two chars are '/'. Thiago: Data urls cannot begin with //. So iff we encounter such an url, the behaviour of the data url kioslave is undefined (concerning the rfc). Therefore bug 62425 does not apply. Nonetheless I think data urls should be treated specially, should the patch of 62425, or any equivalent ever be applied. David: I reopened this bug because there is still an issue left with the kioslave implementation. But meanwhile I think it should go in a bug of its own. Therefore, resolving. *** Bug 25334 has been marked as a duplicate of this bug. *** |