do not run regex for empty host name since regex always fails in this case,

the bug had been introduced in r2196
This commit is contained in:
Igor Sysoev 2009-10-22 09:48:42 +00:00
parent 315cfa0ab3
commit 663e957957

View File

@ -1688,7 +1688,7 @@ ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len)
#if (NGX_PCRE)
if (r->virtual_names->nregex) {
if (len && r->virtual_names->nregex) {
size_t ncaptures;
ngx_int_t n;
ngx_uint_t i;