nginx: add patches to lua modules for experimental PCRE2 support

Add patches to lua modules for experimental PCRE2 support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi
2023-09-22 14:44:44 +02:00
parent fa1001268c
commit 6bba36078e
3 changed files with 2422 additions and 24 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
--- a/nginx-mod-lua/src/ngx_http_lua_module.c
+++ b/nginx-mod-lua/src/ngx_http_lua_module.c
@@ -207,12 +207,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -212,12 +212,14 @@ static ngx_command_t ngx_http_lua_cmds[]
offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
NULL },
@@ -15,7 +15,7 @@
{ ngx_string("init_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
@@ -228,12 +230,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -233,12 +235,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_init_by_file },
@@ -30,7 +30,7 @@
{ ngx_string("init_worker_by_lua"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
@@ -249,12 +253,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -254,12 +258,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_init_worker_by_file },
@@ -45,7 +45,7 @@
{ ngx_string("exit_worker_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
@@ -264,6 +270,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -269,6 +275,7 @@ static ngx_command_t ngx_http_lua_cmds[]
(void *) ngx_http_lua_exit_worker_by_file },
#if defined(NDK) && NDK
@@ -53,7 +53,7 @@
/* set_by_lua_block $res { inline Lua code } */
{ ngx_string("set_by_lua_block"),
NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -272,6 +279,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -277,6 +284,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_filter_set_by_lua_inline },
@@ -61,7 +61,7 @@
/* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */
{ ngx_string("set_by_lua"),
@@ -292,6 +300,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -297,6 +305,7 @@ static ngx_command_t ngx_http_lua_cmds[]
(void *) ngx_http_lua_filter_set_by_lua_file },
#endif
@@ -69,7 +69,7 @@
/* server_rewrite_by_lua_block { <inline script> } */
{ ngx_string("server_rewrite_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@@ -299,6 +308,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -304,6 +313,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_SRV_CONF_OFFSET,
0,
(void *) ngx_http_lua_server_rewrite_handler_inline },
@@ -77,7 +77,7 @@
/* server_rewrite_by_lua_file filename; */
{ ngx_string("server_rewrite_by_lua_file"),
@@ -317,6 +327,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -322,6 +332,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_rewrite_handler_inline },
@@ -85,7 +85,7 @@
/* rewrite_by_lua_block { <inline script> } */
{ ngx_string("rewrite_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -325,6 +336,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -330,6 +341,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_rewrite_handler_inline },
@@ -93,7 +93,7 @@
/* access_by_lua "<inline script>" */
{ ngx_string("access_by_lua"),
@@ -335,6 +347,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -340,6 +352,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_access_handler_inline },
@@ -101,7 +101,7 @@
/* access_by_lua_block { <inline script> } */
{ ngx_string("access_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -343,6 +356,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -348,6 +361,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_access_handler_inline },
@@ -109,7 +109,7 @@
/* content_by_lua "<inline script>" */
{ ngx_string("content_by_lua"),
@@ -352,6 +366,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -357,6 +371,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_content_handler_inline },
@@ -117,7 +117,7 @@
/* content_by_lua_block { <inline script> } */
{ ngx_string("content_by_lua_block"),
NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
@@ -359,6 +374,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -364,6 +379,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_content_handler_inline },
@@ -125,7 +125,7 @@
/* log_by_lua <inline script> */
{ ngx_string("log_by_lua"),
@@ -369,6 +385,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -374,6 +390,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_log_handler_inline },
@@ -133,7 +133,7 @@
/* log_by_lua_block { <inline script> } */
{ ngx_string("log_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -377,6 +394,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -382,6 +399,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_log_handler_inline },
@@ -141,7 +141,7 @@
{ ngx_string("rewrite_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -433,6 +451,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -438,6 +456,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_header_filter_inline },
@@ -149,7 +149,7 @@
/* header_filter_by_lua_block { <inline script> } */
{ ngx_string("header_filter_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -441,6 +460,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -446,6 +465,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_header_filter_inline },
@@ -157,7 +157,7 @@
{ ngx_string("header_filter_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -458,6 +478,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -463,6 +483,7 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_body_filter_inline },
@@ -165,7 +165,7 @@
/* body_filter_by_lua_block { <inline script> } */
{ ngx_string("body_filter_by_lua_block"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -466,6 +487,7 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -471,6 +492,7 @@ static ngx_command_t ngx_http_lua_cmds[]
NGX_HTTP_LOC_CONF_OFFSET,
0,
(void *) ngx_http_lua_body_filter_inline },
@@ -173,7 +173,7 @@
{ ngx_string("body_filter_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
@@ -475,12 +497,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -480,12 +502,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_body_filter_file },
@@ -188,7 +188,7 @@
{ ngx_string("balancer_by_lua_file"),
NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
@@ -585,12 +609,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -590,12 +614,14 @@ static ngx_command_t ngx_http_lua_cmds[]
offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers),
NULL },
@@ -203,7 +203,7 @@
{ ngx_string("ssl_client_hello_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
@@ -599,12 +625,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -604,12 +630,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_ssl_client_hello_handler_file },
@@ -218,7 +218,7 @@
{ ngx_string("ssl_certificate_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
@@ -613,12 +641,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -618,12 +646,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_ssl_cert_handler_file },
@@ -233,7 +233,7 @@
{ ngx_string("ssl_session_store_by_lua_file"),
NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
@@ -627,12 +657,14 @@ static ngx_command_t ngx_http_lua_cmds[]
@@ -632,12 +662,14 @@ static ngx_command_t ngx_http_lua_cmds[]
0,
(void *) ngx_http_lua_ssl_sess_store_handler_file },