Project

General

Profile

Actions

Bug #1798

closed

$HTTP["host"] returns error 400 if host does not have a dot

Added by maccaday about 16 years ago. Updated about 16 years ago.

Status:
Invalid
Priority:
Low
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

Linux/Lighttpd 1.4.20 + SSL/Bzip/Zlib compiled

If the hostname does not have a period in (e.g. http://mysite) error 400 is returned.
Ordinarily, this would not be a problem, since most domains have dots in. However there are 3
I can think of where this might be important:

1) Internal/local redirection or proxying
2) Desktop development (e.g. http://mysite is a desktop development version of http://mysite.com)
3) The new domains that may start to be used if TLDs are sold (e.g. http://google)
- this has been proposed, but I'm not sure if a decision on whether to do it has been made.

Actions #1

Updated by darix about 16 years ago

please add an example config that illustrates the problem.

Actions #2

Updated by darix about 16 years ago

  • Status changed from New to Need Feedback
Actions #3

Updated by maccaday about 16 years ago

Example config as follows:

server.username = "lighttpd" 
server.groupname = "lighttpd" 

server.document-root = "/www/public" 
server.port          = 80

server.errorlog      = "/www/logs/error.log" 
accesslog.filename   = "/www/logs/access.log" 

index-file.names = ( "index.html" , "index.htm" , "index.php" )

include "mime_types.conf" 

server.modules = (
                  "mod_accesslog" 
                 )

# this works

$HTTP["host"] == "othersite.com" {

   # settings here
}

# this doesn't work - 400 (Bad Request) Error

$HTTP["host"] == "othersite" {

   # settings here
}
Actions #4

Updated by darix about 16 years ago

We can not reproduce it here.
can you add:

debug.log-request-handling = "enable"

to your config and paste the error log part for the request?

Actions #5

Updated by maccaday about 16 years ago

I've just realised what the problem is - when I did it on my own server, I used an underscore in the domain. I remembered seeing that there is an issue with underscores in domain names in Lighty because of the HTTP Recommendations (that is in another ticket somewhere) whilst I was searching for this issue.

This can be closed - sorry for taking up your time.

Actions #6

Updated by stbuehler about 16 years ago

  • Status changed from Need Feedback to Invalid
  • % Done changed from 0 to 100
Actions

Also available in: Atom