Welcome! Log In Create A New Profile

Advanced

[njs] Ignoring pcre_study() error.

Valentin Bartenev
November 20, 2020 04:34AM
details: https://hg.nginx.org/njs/rev/e51da8c71f26
branches:
changeset: 1569:e51da8c71f26
user: Valentin Bartenev <vbart@nginx.com>
date: Fri Nov 20 12:29:30 2020 +0300
description:
Ignoring pcre_study() error.

It provides optional optimization that shouldn't be fatal for regex compilation.

diffstat:

src/njs_pcre.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diffs (15 lines):

diff -r c947a300b96c -r e51da8c71f26 src/njs_pcre.c
--- a/src/njs_pcre.c Wed Nov 18 18:09:11 2020 +0000
+++ b/src/njs_pcre.c Fri Nov 20 12:29:30 2020 +0300
@@ -94,10 +94,8 @@ njs_regex_compile(njs_regex_t *regex, u_
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,
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Ignoring pcre_study() error.

Valentin Bartenev 372 November 20, 2020 04:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 308
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready