From kde-devel Fri Apr 13 05:38:51 2001 From: Dawit Alemayehu Date: Fri, 13 Apr 2001 05:38:51 +0000 To: kde-devel Subject: Re: Konqueror resolving domains X-MARC-Message: https://marc.info/?l=kde-devel&m=98714056407542 On Thursday 12 April 2001 19:52, David Faure wrote: > On Friday 13 April 2001 00:03, John Mark Walker wrote: > > Hi, > > > > I've come across an odd "feature" in konqueror - it doesn't seem to > > recognize domains commonly used to serve banners ads. The 2 that come to > > mind the most are adforce.imgis.com and ad.doubleclick.net. > > > > I keep getting "Unknown host adforce.imgis.com" and "Unknown host > > ad.doubleclick.net." Of course, I can ping both of these URL's, and > > Netscape connects to them just fine. > > > > Ordinarily, I wouldn't mind so much, except that I'm a web developer, and > > I can't test whether my code is wrong when putting new banners in a web > > site. This means I always have to pull up the big ugly beast of a browser > > - Netscape - just to verify that changes I made are correct. > > Very interesting... I've been seeing the same problems, but I didn't > realize they came from Konqueror itself (well, kio_http rather). Well well well... I am not the only that saw this from time to time then, great :) I just ignored it because I thought it was simply a timeout issue for on my connection, but now I am curious since both of you experience the same thing FWIW, I usually got this with some not all of the ad.doubleclick.net banners on top of LinuxToday. > > Was this intentional or what? > > I don't think so. Can't be found in the sources :) > (And it would be quite stupid if it was - a dialog box is even worse than > an ad :-) > > I can only think that this is related to the KSocket changes. Anyone > knowing KSocket could test this ? I tried ksocktest but it's a bit... > strange :) Hmm... I am not so sure about this change being the cause because I used to see this issue a long while before these changes were made. My hunch was improper resolution of relative URLs ??? Hmm.. maybe not! Oh it could however be that these ad banners are asscoiated with a cookie. If these cookies are then rejected automatically through a set policy or manually, all subsequent requests to retrieve images from such sites might be rejected ?? > > Additionally, along the same lines as this, I notice that konqueror > > doesn't resolve domains on my network whenever I type just the host > > without the full domain and "http://" That is, if I type "vaweb" is goes > > to a google search, but if I type "http://vaweb" it goes to our internal > > web server (as it should). > > That's a FAQ and it's unrelated. This is due to the "internet keywords" > feature. Well Dawit saves David sometime and writes the FAQ for this since he has been meaning to do it for a while now :) Will post to konqy's FAQ site sometime tomorrow Why does konqueror redirect me to Realnames or Google when I type names for machines in my own domain/network ? This is one of the most frequently asked question. There are a few valid reasons why this does not work like say in Netscape and of course there is a workaround for it. 1.) DNS look-ups can in some circumstances be very very slow! Most people are not affected by this since their /etc/resolv.conf are not large and thus name resolution is fast, but this is still an issue we had to consider. 2.) Neither one of the two filters currently available perform any DNS lookup to resolve improperly formatted URLs. And these filters are also NOT used at the low level IO-subsystem where such DNS lookups make sense without incurring an overhead for doing unecessary multiple lookups! So the filters simply use some heruistics to resolve the malformed or improper URL. 3.) Another reason a lot of people seem to overlook is that there is no way even with a DNS look up that one can correctly determine what service is being requested. For example, if you run both an ftp and http server on a specific machine which one is supposed to be invoked when you simply type the name of your machine ? Netscape simply defaults to the webserver (port 80) even if that service does not exist at a given time. Here is the current workaround to fix this problem: - Simply create a file named kshorturifilterrc under $KDEHOME/share/config, where $KDEHOME is the directory where your local kde config is located, and add a config group labeled "Pattern Match". - Under this new group enter a name=value pair of the domain you want to be matched and the protocol to be used. For example, if my local machine name is "workgroup" and I had both ftp (on port 21) and http (on port 80) servers running on it I would simply add the following to the file mentioned above: [Pattern Match] ^workgroup:21=ftp:// ^workgroup:80=http:// ^workgroup=http:// If you have an instance of konqueror already running, do ALT+ F2 and type (or cut and paste the following command to update the running instances with the new entries: dcop konqueror KShortURIFilterIface configure NOTE: The first entry is a regexp (actually a QRegExp) based entry that simply means to match anything that begins with the given text. NOTE: currently the characters "[" and "]" are not supported in the given regexp because of a problem with how these values are handled when they are read back. NOTE 2: If you are a system adminstrator and want these values to be available to all users on a particular machine, simply make the changes in the system config (under $KDEDIR/share/config) instead of the the local config directory. For KDE 2.2, we hope to resolve this issue by making it very simple to add these exceptional cases to your list or even perhaps creating a new filter that performs DNS lookup before attempting to redirect to a given site. Regards, Dawit A. >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<