Bug 759634

Summary: Konqueror ignores /etc/hosts
Product: [Fedora] Fedora Reporter: Stuart Jansen <bugzilla+redhat>
Component: kdebaseAssignee: Than Ngo <than>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: jreznik, kevin, ltinkl, mbriza, rdieter, rnovacek, ry, smparrish, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-27 10:01:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.