diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-10-22 09:48:42 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-10-22 09:48:42 +0000 |
commit | 663e9579575ca7b226ba5efa82253f619fcb7a94 (patch) | |
tree | 6d5c2fe9f89e254d3258be5140a4d3f8dbece057 /src/http/ngx_http_request.c | |
parent | 315cfa0ab3ca86371d25bafbb7482d0b3889a335 (diff) | |
download | nginx-663e9579575ca7b226ba5efa82253f619fcb7a94.tar.gz nginx-663e9579575ca7b226ba5efa82253f619fcb7a94.zip |
do not run regex for empty host name since regex always fails in this case,
the bug had been introduced in r2196
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 3ae6ddb28..a0c4ea3b8 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -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; |