Bug 249204 - konqueror ignores addresses in /etc/hosts
Summary: konqueror ignores addresses in /etc/hosts
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.4.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-27 11:57 UTC by Ute Hauth
Modified: 2011-11-29 11:35 UTC (History)
2 users (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 Ute Hauth 2010-08-27 11:57:01 UTC
Version:           4.4.2 (using KDE 4.4.2) 
OS:                Linux

I am using my localhost in the following form:

http://computername_projectname.tld

All projects exist in /etc/hosts e.g:
192.168.2.13 http://servername_projectname.tld
192.168.2.13 http://servername_nextprojectname.tld
...

If I request projects by this name http://servername_projectname.tld it works in firefox, chrome, seamonkey, opera. But konqueror cannot handle it. 

If I ask for http://servername_projectname.tld it redirects to http without the rest of the url and tells me:
unknown name  Name „“ does not exist

I tried to put the url as well as a bookmark and as the welcome page but it makes no difference.

sftp://computername and ftp://computername work

Reproducible: Always

Steps to Reproduce:
Use apache webserver with different projects and use instead of http://localhost oder http://servername the form:
http://servername_projectname.tld
firefox and co are working fine, 

Actual Results:  
konqueror cuts the url just to http

Expected Results:  
show the web pages of my local projects in the way it did in former versions and in the way all other browsers do it
Comment 1 Thiago Macieira 2010-08-27 12:44:41 UTC
Your /etc/hosts file is malformed. Please read the manual for that file (man 5 hosts, see online version at http://unixhelp.ed.ac.uk/CGI/man-cgi?hosts).

Remove the "http://" part of the names you put there.
Comment 2 Ute Hauth 2010-08-27 13:27:08 UTC
Sorry, my example was wrong, there is no http inside: 
192.168.2.13 servername_projectname.tld
192.168.2.13 servername_nextprojectname.tld
Comment 3 Thiago Macieira 2010-08-27 13:58:38 UTC
Then I can't reproduce. I have a hostname in my /etc/hosts that works just fine in Konqueror.

Can you ping those hostnames from the command-line? If you can, then it should work in Konqueror too.
Comment 4 Ute Hauth 2010-08-27 14:27:06 UTC
Yes, I can ping servername_projectname.tld of all the projects, it does also work in the other browsers. Konqueror could handle it as well for years, just in the current version it doesn't.

I don't know why konqueror starts to rewrite the url. It can handle http://localhost and http://servername but with the projects it starts rewriting. If I investigate intensively I can see for a moment it tells something like:

//?error 114 & error Text

unfortunately the message occurres just for a moment in the address line before it redirects to
 http:
and inside telling something like that:

unknown name  Name „“ does not exist

The message is in German I don't know exactly what it would say in English.

I guess konqueror starts to early asking the search engine where the local url does not exist.

######## I started it from command-line ######
 konqueror --preload http://tyra_miradlo.net
QFSFileEngine::open: No file name specified
konqueror(5659) OpenSearchManager::setSearchProvider: "Cannot open opensearch description file: " 
konqueror(5659)/kdecore (KLibrary) findLibraryInternal: plugins should not have a 'lib' prefix: "libkhtmlpart.so"
konqueror(5659)/kdecore (KLibrary) findLibraryInternal: plugins should not have a 'lib' prefix: "libkhtmlpart.so"
konqueror(5659)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/libkhtmlpart.so" does not offer a qt_plugin_instance function.

########

Does this help you?
Comment 5 Thiago Macieira 2010-08-27 16:24:53 UTC
No, sorry, it doesn't help me.

What I can tell you is that it works for me with KDE 4.5.
Comment 6 Ute Hauth 2010-10-10 21:03:41 UTC
Thanks for your immediate answer. I hope it helps me and ubuntu will fix it in the LTS-Version as well. :)
Comment 7 Ute Hauth 2011-11-29 11:35:48 UTC
problem gone in later versions