fix :port handling in $HTTP["host"] checks (fixes #2135. thx liming)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2853 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
d4d1ff36aa
commit
9b246c5e09
1
NEWS
1
NEWS
|
@ -9,6 +9,7 @@ NEWS
|
|||
* Handle ENAMETOOLONG, return 404 Not Found (fixes #2396, thx dererkazo)
|
||||
* configure.ac: remove old stuff, add some new to fix warnings in automake 1.12 (fixes #2419, thx blino)
|
||||
* add PATCH method (fixes #2424)
|
||||
* fix :port handling in $HTTP["host"] checks (fixes #2135. thx liming)
|
||||
|
||||
- 1.4.31 - 2012-05-31
|
||||
* [ssl] fix segfault in counting renegotiations for openssl versions without TLSEXT/SNI (thx carpii for reporting)
|
||||
|
|
|
@ -299,17 +299,13 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
|
|||
ck_colon = strchr(dc->string->ptr, ':');
|
||||
val_colon = strchr(l->ptr, ':');
|
||||
|
||||
if (ck_colon == val_colon) {
|
||||
/* nothing to do with it */
|
||||
break;
|
||||
}
|
||||
if (ck_colon) {
|
||||
if (NULL != ck_colon && NULL == val_colon) {
|
||||
/* condition "host:port" but client send "host" */
|
||||
buffer_copy_string_buffer(srv->cond_check_buf, l);
|
||||
buffer_append_string_len(srv->cond_check_buf, CONST_STR_LEN(":"));
|
||||
buffer_append_long(srv->cond_check_buf, sock_addr_get_port(&(srv_sock->addr)));
|
||||
l = srv->cond_check_buf;
|
||||
} else if (!ck_colon) {
|
||||
} else if (NULL != val_colon && NULL == ck_colon) {
|
||||
/* condition "host" but client send "host:port" */
|
||||
buffer_copy_string_len(srv->cond_check_buf, l->ptr, val_colon - l->ptr);
|
||||
l = srv->cond_check_buf;
|
||||
|
|
Loading…
Reference in New Issue