[PATCH] fix proxy autodetection with webdav urls.

Thiago Macieira thiago at kde.org
Mon Mar 7 15:08:05 GMT 2005


Waldo Bastian wrote:
>On Monday 07 March 2005 15:50, Thiago Macieira wrote:
>> Dawit A. wrote:
>> >+            if( p == "webdav" )
>> >+              u.setProtocol("http");
>> >+            else if ( p == "webdavs" )
>> >+              u.setProtocol("https");
>> >+
>> >+            if ( p.startsWith("http") || p.startsWith("webdav") || p
>> > == "ftp" || p == "gopher" )
>> > +              DCOPRef( "kded", "proxyscout" ).call( "proxyForURL",
>> > u ).get( proxy );
>>
>> If you setProtocol to http, it'll never startWith webdav. You might as
>> well remove the test and save a few CPU cycles.
>
>That assumes you test against "u.protocol()" instead of "p"

So test against that. Or set p as well:
	if ( p == "webdav" )
	  u.setProtocol( p = "http" );
	/* ... */

-- 
  Thiago Macieira  -  thiago (AT) macieira (DOT) info
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

2. Tó cennan his weorc gearu, ymbe se circolwyrde, wearð se cægbord and se 
leohtspeccabord, and þa mýs cómon lator. On þone dæg, he hine reste.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050307/46d43d3e/attachment.sig>


More information about the kde-core-devel mailing list