PATCH: KProtocolInfo's use of KProtocolManager::slaveProtocol

Dawit A. (by way of Dawit A. <adawit@kde.org>) adawit at kde.org
Mon Jul 19 14:03:06 BST 2004


On Monday 19 July 2004 06:17, you wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sunday 18 July 2004 23:09, Dawit A. wrote:
> > Hello,
> >
> > The following patch makes it an explicit requirement for a protocol
> > to declare that its support for proxying relies on another protocol.
> > This way the majority of protocols that do not support proxying get
> > penalized when any of the static KProtocolInfo:: functions are
> > invoked.
>
> That makes sense, but does it really make a difference in practice?
> Because the scheduler will call slaveProtocol() anyway.

Well that is a good question and I think it does because it stops
slaveProtocol from being called multiple times. Applciations like Konqueror
simply call these static functions to check whether or not a given protocol
supports something or not. We even call one or more of these static functions
from the KIO::Job classes.

> Maybe instead of a boolean we should use a list of protocols that can proxy
> this protocol. An empty list means no proxy support and we can then skip
> the proxy test in slaveProtocol completely. Only if the list contains 2 or
> more entries, or one entry that points to another protocol we need to check
> which protocol to use.
>
> I guess that would mean that http,https,webdav,webdavs and ftp should all
> list http and https as possible proxy protocols. Something like:
> 	ProxiedBy=http,https
> Are their other protocols that have the ability to use a proxy?

Hmm... that can work as well, but you would end up in a circular dependency,
no ? KProtocolInfo depends on KProtocolManager and KProtocolManager depends
on KProtocolInfo...


--
Regards,
Dawit A.
"Preach what you practice, practice what you preach"




More information about the kde-core-devel mailing list