Bug 300952 - kde prepends "www." if it doesn't recognise the domain as valid
Summary: kde prepends "www." if it doesn't recognise the domain as valid
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-31 17:30 UTC by Philip Allen
Modified: 2012-06-18 20:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Allen 2012-05-31 17:30:23 UTC
I use a set of proxy instructions to instruct kde (and konqueror) to route local URLs through an ssh tunnel.  When I request (say) foo.bar.local, konqueror tries to display www.foo.bar.local.  Instead, I get a message from the cache on bar.local saying that "www.foo...." is not a known host.

So we know that the proxy script is working, and the ssh tunnel is correctly forwarding to the bar.local network.  But it appears that kde/konqueror is pre-pending "www." on the front of the requested URL.  However, if I select a URL on the internet that does not begin with "www." (e.g. news.google.com) it requests the correct URL without prepending.

I get the same behaviour when clicking on a link in kmail, so it looks like a kde component rather than konqueror.

It appears, therefore, that kde is taking the original requested URL and checking that against DNS.  When that fails (because the URL is on a separate private network) it is adding "www." and then passing the amended request to konqueror.   

Reproducible: Always



Expected Results:  
I'm not sure why it should be appropriate to prepend "www." ever.  Most websites handle this anyway.  That said, if we must have prepending, it should not be doing a DNS search (and deeming the prepending necessary) if the URL  is being passed elsewhere by the proxy script.

I raised this problem under Bug 187713.  I suspect that this issue as I have reported it has been with us for a while, certainly since kde 4.2.
Comment 1 Dawit Alemayehu 2012-06-09 06:15:00 UTC
It is not Konqueror that is doing it. It is one of the URI filter plugins, localdomainurifilter to be exact, that appends the "www." because it cannot resolve (DNS lookup) the URL you entered. If that is unwanted as it is the case for you, then simply following the steps I outlined @ https://bugs.kde.org/show_bug.cgi?id=207550#c1 should resolve the issue for you.
Comment 2 Myriam Schweingruber 2012-06-18 19:57:47 UTC
Could you please also specify the version here?
Comment 3 Philip Allen 2012-06-18 20:46:44 UTC
(In reply to comment #1)
> It is not Konqueror that is doing it. It is one of the URI filter plugins,
> localdomainurifilter to be exact, that appends the "www." because it cannot
> resolve (DNS lookup) the URL you entered. If that is unwanted as it is the
> case for you, then simply following the steps I outlined @
> https://bugs.kde.org/show_bug.cgi?id=207550#c1 should resolve the issue for
> you.

I can confirm that editing fixhosturifilter.desktop fixes the problem.

In answer to #c2, it was relevant to fc12-fc14-fc16. e.g. Konqueror 4.6.5.  However, as Dawit Alemayehu points out, this was a URI filter plugin issue really, not konqueror.  Anyway, I'm going to close it unless someone thinks this should turn into a documentation bug.