fix trailing wildcard when two or more listen used in one server

This commit is contained in:
Igor Sysoev 2007-08-24 11:05:47 +00:00
parent 293ba66eba
commit 43f3aead14

View File

@ -889,10 +889,15 @@ wildcard:
/* convert "www.example.*" to "www.example\0" */
p = key->data;
key->data[last] = '\0';
last++;
p = ngx_palloc(ha->temp_pool, last);
if (p == NULL) {
return NGX_ERROR;
}
ngx_cpystrn(p, key->data, last - 1);
hwc = &ha->dns_wc_tail;
keys = &ha->dns_wc_tail_hash[k];
}