[patch] Making KDE work with (web based) proxy scripts again

Scott Wheeler wheeler at kde.org
Tue Jan 13 19:51:32 GMT 2004


For some time at work we've been unable to use KDE's autoconfiguration based 
on a specific URL.  This was reported in bug #69026.

The basic problem is that kded is that when Konq browses to a certain URL 
KProtocolManager::proxyForURL() is called on that URL which queries kded for 
the proxy.  kded then finds out that the file it's looking for 
(http://proxy:8083) is using the http protocol, so it calls 
KProtocolManager::proxyForURL() to determine how to fetch itself.  ;-)

This would probably end up as an infinite loop if there wasn't a wait call in 
one of the DCOP calls.

The attach patch makes sure that if proxyForURL() is called on 
proxyConfigScript() (in our case http://proxy:8083) that it returns "DIRECT" 
rather than trying to look up the proxy to handle that with.

Also along the way I realized that KURL::url() (and as such KURL::equals()) 
doesn't actually strip or add the trailing slash as indicated by the optional 
parameter in the case that there is no path.  i.e.

KURL("http://proxy:8083").equals("http://proxy:8083/"), true) == false

I'm guessing that the change to KURL is wrong, because it seems like for the 
way it was coded that there must be something that assume trailingSlash() 
won't strip or append a slash if the path is empty, but since that's 
counterintuitive I'll leave that to someone else to confirm.

Thoughts?  IMHO having this broken is a pretty big deal...

-Scott

-- 
Audience Member: "What is the book [on CS] that you most want to read?"
Donald Knuth: "It's not `The Art of Computer Programming for Dummies.`"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-proxy-config.patch
Type: text/x-diff
Size: 1630 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040113/57960ae4/attachment.patch>


More information about the kde-core-devel mailing list