klocaldomainurifilterhelper (Re: Ctrl+O in Konq)

Thiago Macieira thiago.macieira at kdemail.net
Thu Sep 23 16:13:59 BST 2004


David Faure wrote:
>> That's because "ls" *does* exist:
>
>Not as a host.

That's not what we're testing. We're testing if the name exists.

If we want to test for a hostname, we have to do exactly that. That means 
testing if it has either an IPv4 or IPv6 address -- not counting SRV-based 
redirections that we don't do yet.

>But you can't open a webpage for a top-level domain, can you? The point of
>this "local domain" test is to look for hosts in the local domain...

I know, but we can't do that without getting real deep into DNS, NIS 
and /etc/hosts processing.

>Is there a way to look for an actual host only?

Proposal below.

>$ klocaldomainurifilterhelper cp
>ent=(nil), h_errno=1 NO_ADDRESS=4 returning 1
>$ klocaldomainurifilterhelper ls
>ent=(nil), h_errno=4 NO_ADDRESS=4 returning 0
>
>OK, then I withdraw my request for removing the NO_ADDRESS test, "ls" is a
> really border case.

Still, I would like to make a proposal.

The purpose of the local domain URI filter helper app -- which, by the way, 
couldn't have a longer name -- was initially to test if a domain name had 
an address. Since the advent of IPv6, the test no longer qualified because 
it worked only for IPv4. So I made my modifications that, instead of 
testing for an address, tested for existence of the name.

So when we want to test for X, we go ahead and test for Y. That's bound to 
have wrong results sometimes.

What I propose is that we scrap klocaldomainurifilterhelper and make the 
lookup inside the program calling klocaldomainurifilterhelper instead. With 
true asynchronous lookups we have now with KResolver, there's no more 
blocking involved than waiting for an external process. And it has the 
benefit of testing exactly what we need. With one less forking.

And, btw, sometime recently, typing "intranet/webmail" has changed from 
getting us to "http://intranet/webmail", to resulting in an error 
(malformed URL).

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040923/22f920a8/attachment.sig>


More information about the kfm-devel mailing list