diff src/http/ngx_http_request.c @ 3228:1e1e66ef3a40

do not run regex for empty host name since regex always fails in this case, the bug had been introduced in r2196
author Igor Sysoev <igor@sysoev.ru>
date Thu, 22 Oct 2009 09:48:42 +0000
parents c8de5a8b6d17
children e07630a9547d
line wrap: on
line diff
--- 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_re
 
 #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;