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

Scott Wheeler wheeler at kde.org
Tue Jan 13 23:45:37 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 13 January 2004 23:30, Dawit A. wrote:

> Why ? The proxyscout code will always detect the URL is the same as the one 
> it is trying to download and return "DIRECT". See 
> kdelibs/kio/misc/kpac/proxyscout.cpp around line 66.

[...]

> Not yet. We all understand the problem, but we do not know the cause...
> Can you please add debug statements to the below the line mentioned about 
> and  see if you ever get to it when the proxy attempts to download the 
> script file... BTW, I cannot duplicate this at all! It works fine for me... 
> There  must be something else going on here....

Ok, I asked Waldo to look over this one earlier and got him to approve it so I 
already checked it in, (as I would rather have it working and a little 
unclear than not working and unclear for the release) but if we come up with 
a cleaner solution I'd be more than happy to revert that.

However, looking at the line you point out:

if ( m_downloader && url == m_downloader->scriptURL() ) return "DIRECT";

I'm pretty sure that I see the problem -- the equality operator here won't 
work in a lot of situations because the URL as one of the two (don't remember 
which off the top of my head -- I can only test this at work) is usually 
padded with a trailing "/" and the equality operator will return false.  i.e. 
in our case "http://proxy:8083" != "http://proxy:8083/"

Tomorrow I'll try to switch the line above to use:

url.equals( m_downloader->scriptURL(), true )

instead and see if that fixes things.  (And the above would only work after 
the small KURL change that I checked in.)

- -Scott

- -- 
Stupidity is the basic building block of the universe.
- --Frank Zappa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQFABIMkQu0ByfY5QTkRAhRSAJ0ZzMH8fpQi1/x5fEhgbt83bXToPwCgiTbs
uIJ7mxP+Vs8rs3jmt6H9yOY=
=BJx1
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list