]> git.kaiwu.me - njs.git/commitdiff
Ignoring pcre_study() error.
authorValentin Bartenev <vbart@nginx.com>
Fri, 20 Nov 2020 09:29:30 +0000 (12:29 +0300)
committerValentin Bartenev <vbart@nginx.com>
Fri, 20 Nov 2020 09:29:30 +0000 (12:29 +0300)
It provides optional optimization that shouldn't be fatal for regex compilation.

src/njs_pcre.c

index c8fa5ba2bcdd0c239919c9b4e18c4ab2a1b4b822..2fafea7a393a93cf8cfe212d46a33dcce6ec48be 100644 (file)
@@ -94,10 +94,8 @@ njs_regex_compile(njs_regex_t *regex, u_char *source, size_t len,
     regex->extra = pcre_study(regex->code, 0, &errstr);
 
     if (njs_slow_path(errstr != NULL)) {
-        njs_alert(ctx->trace, NJS_LEVEL_ERROR,
+        njs_alert(ctx->trace, NJS_LEVEL_WARN,
                   "pcre_study(\"%s\") failed: %s", pattern, errstr);
-
-        goto done;
     }
 
     err = pcre_fullinfo(regex->code, NULL, PCRE_INFO_CAPTURECOUNT,