diff options
author | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2009-07-14 12:58:02 +0000 |
---|---|---|
committer | stbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2009-07-14 12:58:02 +0000 |
commit | 4b6e9da58611bbf086ae2932a06d41fe9d82b766 (patch) | |
tree | e223cf5a83fe6a9e6df8ebf86b1e4b3641a5dc91 | |
parent | c52f4209c9381305d182203705d6d943dbdd927f (diff) | |
download | lighttpd-4b6e9da58611bbf086ae2932a06d41fe9d82b766.tar.gz |
Allow digits in hostnames in more places (fixes #1148)
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2587 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/request.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -134,6 +134,7 @@ NEWS * Set FD_CLOEXEC for bound sockets before pipe-logger forks (fixes #2026) * Report non-fatal ssl errors as "connection close" * Add '%_' pattern for complete hostname in mod_evhost (fixes #1737) + * Allow digits in hostnames in more places (fixes #1148) - 1.5.0-r19.. - * -F option added for spawn-fcgi diff --git a/src/request.c b/src/request.c index a3cde829..26463f24 100644 --- a/src/request.c +++ b/src/request.c @@ -113,7 +113,7 @@ static int request_check_hostname(buffer *host) { /* check the first character at right of the dot */ if (is_ip == 0) { - if (!light_isalpha(host->ptr[i+1])) { + if (!light_isalnum(host->ptr[i+1])) { return -1; } } else if (!light_isdigit(host->ptr[i+1])) { @@ -135,7 +135,7 @@ static int request_check_hostname(buffer *host) { } } else if (i == 0) { /* the first character of the hostname */ - if (!light_isalpha(c)) { + if (!light_isalnum(c)) { return -1; } label_len++; |