Bug 759634 - Konqueror ignores /etc/hosts
Summary: Konqueror ignores /etc/hosts
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: kdebase
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-02 21:29 UTC by Stuart Jansen
Modified: 2012-06-27 10:01 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-27 10:01:43 UTC
Type: ---


Attachments (Terms of Use)

Description Stuart Jansen 2011-12-02 21:29:54 UTC
Description of problem:
Konqueror isn't able to resolve localhost despite an entry in the /etc/hosts file.

Most likely, Konq is trying to resolve DNS names faster by bypassing NSS. However in doing so expected behavior is broken.

How reproducible:

Always

Steps to Reproduce:

0. Install and start a Web server on localhost
1. Make sure /etc/hosts contains "127.0.0.1 localhost"
2. Disable all network interfaces
3. ping -c 3 localhost
   note that it works
4. Open "http://localhost/" in Konqueror
   note that it doesn't work
5. Open "http://localhost/" in Firefox
   note that it works

Comment 1 Kevin Kofler 2011-12-03 00:37:06 UTC
Uhm, /etc/hosts has always worked for me with Konqueror.

Comment 2 Rex Dieter 2011-12-03 19:44:22 UTC
I tested by 

$ sudo yum install httpd

$ sudo /etc/rc.d/init.d/httpd start
Starting httpd (via systemctl): 

unchecked 'enable networking' in kde-plasma-networkmangement to disable all network interfaces.

Firefox failed initially with a warning error:

Firefox is currently in offline mode and can't browse the Web.
Press "Try Again" to switch to online mode and reload the page.

whereas konqueror loaded my default apache "Fedora Test Page" just fine.

$ cat /etc/hosts
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6


So, worksforme.    ??

Comment 3 Rex Dieter 2011-12-03 19:46:16 UTC
Out of paranoia, retested konq using both webkit/khtml webbrowser engines, same results (both work ok for me).

Comment 4 Martin Bříza 2012-06-27 10:01:43 UTC
Hello,
since the report is here for a while without any confirmation from the reporter, I'm closing it as worksforme. 
However, if it really does not work for you, Stuart, feel free to reopen it with any additional information you will be able to provide.
Thank you.


Note You need to log in before you can comment on or make changes to this bug.