openresty / stream-lua-nginx-module

Embed the power of Lua into NGINX TCP/UDP servers
BSD 2-Clause "Simplified" License
729 stars 198 forks source link

feature required: support PCRE2 #320

Closed stdanley closed 10 months ago

stdanley commented 1 year ago

Because of the api change, this module can't work with PCRE2 ,which nginx has already handled correctly, using macro NGX_PCRE2. the problem is when nginx chooses PCRE2, configuration phase fails because the configuration script of this module relies on pcre_version , that function had been removed from pcre2, replaced with pcre2_config.
openresty has plan to support pcre2 in lua module officially?

kapouer commented 1 year ago

Cool, this is a work in progress https://github.com/swananan/stream-lua-nginx-module/commits/support_pcre2

piotrp commented 10 months ago

PCRE2 support has been merged, but pcre_version is still required by config script ("force pcre_version symbol to be required when PCRE is statically linked")

zhuizhuhaomeng commented 10 months ago

PR is welcomed. @piotrp

zhuizhuhaomeng commented 10 months ago

I will close this issue since PCRE2 is supported. You can create another issue. @piotrp

kapouer commented 10 months ago

@piotrp https://github.com/openresty/stream-lua-nginx-module/blob/cafa6f55333541d1c78767a286fa434c97574a4c/config#L407-L409 this is conditionally required, so it's as expected, no ?

piotrp commented 10 months ago

This condition is also met with static build using PCRE2, so it's wrong.

swananan commented 10 months ago

This condition is also met with static build using PCRE2, so it's wrong.

Thanks for the reminder, I have addressed this issue with the following pr: https://github.com/openresty/stream-lua-nginx-module/pull/335