Bug 115986

Summary: Empty Host header causes tux to return 404 (or forward)
Product: Red Hat Enterprise Linux 3 Reporter: Ville Lindfors <ville.lindfors>
Component: tuxAssignee: Ingo Molnar <mingo>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-18 11:34:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ville Lindfors 2004-02-17 14:26:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
Gecko/20040206 Firefox/0.8

Description of problem:
Present, but empty Host header causes tux to return 404



Excerpt from RFC2616 section 14.23

A client MUST include a Host header field in all HTTP/1.1 request
messages . If the requested URI does not include an Internet host
name for the service being requested, then the Host header field MUST
be given with an empty value. 

Version-Release number of selected component (if applicable):
tux-3.2.14-1, kernel-2.4.21-4.EL

How reproducible:
Always

Steps to Reproduce:
# telnet localhost 80
Trying 127.0.0.1...
Connected to (127.0.0.1).
Escape character is '^]'.
GET / HTTP/1.1
Host:

HTTP/1.1 404 Not Found
Connection: Keep-Alive
Content-Length: 29

<HTML> Page Not Found </HTML>
HTTP/1.1 404 Not Found
Connection: Keep-Alive
Content-Length: 29

<HTML> Page Not Found </HTML>Connection closed by foreign host.



# telnet localhost 80
Trying 127.0.0.1...
Connected to (127.0.0.1).
Escape character is '^]'.
GET / HTTP/1.0
Host: foo

HTTP/1.1 200 OK
Content-Type: text/html
Date: Tue, 17 Feb 2004 14:10:15 GMT
Server: TUX/2.0 (Linux)
Content-Length: 0
ETag: "0-eadccacg"
Accept-Ranges: bytes
Last-Modified: Tue, 17 Feb 2004 14:07:34 GMT


Actual Results:  404 not found

Expected Results:  200, page served

Comment 1 Ingo Molnar 2004-08-18 11:34:08 UTC
This is one of the 'weird' requests that Tux rather redirects to
Apache than deal with directly.