1 Star 0 Fork 0

kuoyihp/nginx-lua-module-zh-wiki

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lua_regex_match_limit.md 1.40 KB
一键复制 编辑 原始数据 按行查看 历史

lua_regex_match_limit

语法: lua_regex_match_limit <num>

默认: lua_regex_match_limit 0

环境: http

指定执行ngx.re API时使用PCRE库的"匹配限制"。引述PCRE手册,“the limit ... has the effect of limiting the amount of backtracking that can take place.”。

当触发了这个限制,在Lua代码的ngx.re API函数,将返回错误信息"pcre_exec() failed: -8"。

当设置了限制为0,将使用编译PCRE库的默认"match limit"。这也是这个配置的默认值。

这个指令是在v0.8.5发行版被首次引入的。

Back to TOC

English source:

lua_regex_match_limit

syntax: lua_regex_match_limit <num>

default: lua_regex_match_limit 0

context: http

Specifies the "match limit" used by the PCRE library when executing the ngx.re API. To quote the PCRE manpage, "the limit ... has the effect of limiting the amount of backtracking that can take place."

When the limit is hit, the error string "pcre_exec() failed: -8" will be returned by the ngx.re API functions on the Lua land.

When setting the limit to 0, the default "match limit" when compiling the PCRE library is used. And this is the default value of this directive.

This directive was first introduced in the v0.8.5 release.

Back to TOC

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qizhendong_admin/nginx-lua-module-zh-wiki.git
git@gitee.com:qizhendong_admin/nginx-lua-module-zh-wiki.git
qizhendong_admin
nginx-lua-module-zh-wiki
nginx-lua-module-zh-wiki
master

搜索帮助