Short hostnames in URLs
Dawit A.
adawit at kde.org
Thu Aug 8 02:43:45 BST 2002
On Wednesday 07 August 2002 12:45, Lubos Lunak wrote:
> Dne st 7. srpen 2002 16:45 Simon Hausmann napsal(a):
> [snip]
>
> > > QDns is not blocking. Never. You just need to connect the right
> > > signals and enter (or return to) the event loop.
> >
> > The fact that the urifilter API is sync is a pity in this very case,
> > but I think we shouldn't try to work around it. IMHO there should be
> > no code in kdelibs (and I consider this plugin to be a kdelibs
> > thing, because it is loaded by kdelibs in every default setup) using
> > enter_loop()/exit_loop() or equivalent constructs, unless it is
> > explicitly mentioned in the documentation or somewhere.
> > enter_loop()/processEvents is asking for absolutely nothing but
> > trouble. Just imagine the lookup takes a bit too long and the user
> > closes the konqueror window in the meantime.
>
> *sigh* ... ok.
That is not the only problem. This is going to force at least two lookups in
such scenarios and depending on how slow your nameserver is it can be
unbearable to some!! I remember how many people complained when the now
defunct Realnames Internet Keyword feature was added. This will even do a
lookup if I type localhost in the konqueror or minicli for crying out loud
and if as Waldo said QDNS does not check /etc/hosts, there is going to be a
query for that as well ??
> > Aside from that I second Waldo's concern about QDns. The class does
> > not obey /etc/nsswitch.conf at all (yes, I've seen setups where host
> > lookups were partially done through NIS :(
> >
> > I'd probably dump the feature instead of taking the risk.
>
> I wouldn't. Attached is try #2. Unless there are some more technical
> details to discuss, could now somebody with dial-up check if the timeout
> value doesn't cause some problems?
I am completely against this patch or any other patch that does any type of
lookup at this level. I do understand your issue and I can also understand
why you do not like the compromise solution I mentioned to you eventhough it
is much flexiable in terms of what protocol you can attach to it, but your
patch forces the DNS lookup on everyone like the other browsers do which I
personally do not care for.
Having said that I have one really easy way of resolving this issue for you.
Take this very patch and write your own URIFilter plugin. All you have to do
is inherit from KURIFilterPlugin and re-implement filterURI and create a
desktop for your plugin using the one in the shorturi filter plugin. It is
extremely simple to do this and once installed it will be used by any
application that that makes use of KURIFilter (currently konqueror and
minicli). And then you can add it in kdeaddons or whereever and viola, no
need to try and convience people about why you need it and no need to reapply
patches when KDE changes etc...
Regards,
Dawit A.
More information about the kde-core-devel
mailing list