lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

100-no_by_lua_block.patch (7269B)


      1 --- a/lua-nginx/src/ngx_http_lua_module.c
      2 +++ b/lua-nginx/src/ngx_http_lua_module.c
      3 @@ -157,14 +157,14 @@ static ngx_command_t ngx_http_lua_cmds[]
      4        NGX_HTTP_LOC_CONF_OFFSET,
      5        offsetof(ngx_http_lua_loc_conf_t, log_socket_errors),
      6        NULL },
      7 -
      8 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
      9      { ngx_string("init_by_lua_block"),
     10        NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
     11        ngx_http_lua_init_by_lua_block,
     12        NGX_HTTP_MAIN_CONF_OFFSET,
     13        0,
     14        (void *) ngx_http_lua_init_by_inline },
     15 -
     16 +#endif
     17      { ngx_string("init_by_lua"),
     18        NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
     19        ngx_http_lua_init_by_lua,
     20 @@ -178,14 +178,14 @@ static ngx_command_t ngx_http_lua_cmds[]
     21        NGX_HTTP_MAIN_CONF_OFFSET,
     22        0,
     23        (void *) ngx_http_lua_init_by_file },
     24 -
     25 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
     26      { ngx_string("init_worker_by_lua_block"),
     27        NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
     28        ngx_http_lua_init_worker_by_lua_block,
     29        NGX_HTTP_MAIN_CONF_OFFSET,
     30        0,
     31        (void *) ngx_http_lua_init_worker_by_inline },
     32 -
     33 +#endif
     34      { ngx_string("init_worker_by_lua"),
     35        NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
     36        ngx_http_lua_init_worker_by_lua,
     37 @@ -201,6 +201,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     38        (void *) ngx_http_lua_init_worker_by_file },
     39  
     40  #if defined(NDK) && NDK
     41 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
     42      /* set_by_lua $res { inline Lua code } [$arg1 [$arg2 [...]]] */
     43      { ngx_string("set_by_lua_block"),
     44        NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
     45 @@ -209,7 +210,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     46        NGX_HTTP_LOC_CONF_OFFSET,
     47        0,
     48        (void *) ngx_http_lua_filter_set_by_lua_inline },
     49 -
     50 +#endif
     51      /* set_by_lua $res <inline script> [$arg1 [$arg2 [...]]] */
     52      { ngx_string("set_by_lua"),
     53        NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
     54 @@ -237,7 +238,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     55        NGX_HTTP_LOC_CONF_OFFSET,
     56        0,
     57        (void *) ngx_http_lua_rewrite_handler_inline },
     58 -
     59 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
     60      /* rewrite_by_lua_block { <inline script> } */
     61      { ngx_string("rewrite_by_lua_block"),
     62        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
     63 @@ -246,7 +247,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     64        NGX_HTTP_LOC_CONF_OFFSET,
     65        0,
     66        (void *) ngx_http_lua_rewrite_handler_inline },
     67 -
     68 +#endif
     69      /* access_by_lua "<inline script>" */
     70      { ngx_string("access_by_lua"),
     71        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
     72 @@ -255,7 +256,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     73        NGX_HTTP_LOC_CONF_OFFSET,
     74        0,
     75        (void *) ngx_http_lua_access_handler_inline },
     76 -
     77 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
     78      /* access_by_lua_block { <inline script> } */
     79      { ngx_string("access_by_lua_block"),
     80        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
     81 @@ -264,7 +265,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     82        NGX_HTTP_LOC_CONF_OFFSET,
     83        0,
     84        (void *) ngx_http_lua_access_handler_inline },
     85 -
     86 +#endif
     87      /* content_by_lua "<inline script>" */
     88      { ngx_string("content_by_lua"),
     89        NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
     90 @@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[]
     91        NGX_HTTP_LOC_CONF_OFFSET,
     92        0,
     93        (void *) ngx_http_lua_content_handler_inline },
     94 -
     95 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
     96      /* content_by_lua_block { <inline script> } */
     97      { ngx_string("content_by_lua_block"),
     98        NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
     99 @@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    100        NGX_HTTP_LOC_CONF_OFFSET,
    101        0,
    102        (void *) ngx_http_lua_content_handler_inline },
    103 -
    104 +#endif
    105      /* log_by_lua <inline script> */
    106      { ngx_string("log_by_lua"),
    107        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    108 @@ -289,7 +290,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    109        NGX_HTTP_LOC_CONF_OFFSET,
    110        0,
    111        (void *) ngx_http_lua_log_handler_inline },
    112 -
    113 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
    114      /* log_by_lua_block { <inline script> } */
    115      { ngx_string("log_by_lua_block"),
    116        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    117 @@ -298,7 +299,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    118        NGX_HTTP_LOC_CONF_OFFSET,
    119        0,
    120        (void *) ngx_http_lua_log_handler_inline },
    121 -
    122 +#endif
    123      { ngx_string("rewrite_by_lua_file"),
    124        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    125                          |NGX_CONF_TAKE1,
    126 @@ -353,7 +354,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    127        NGX_HTTP_LOC_CONF_OFFSET,
    128        0,
    129        (void *) ngx_http_lua_header_filter_inline },
    130 -
    131 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
    132      /* header_filter_by_lua_block { <inline script> } */
    133      { ngx_string("header_filter_by_lua_block"),
    134        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    135 @@ -362,7 +363,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    136        NGX_HTTP_LOC_CONF_OFFSET,
    137        0,
    138        (void *) ngx_http_lua_header_filter_inline },
    139 -
    140 +#endif
    141      { ngx_string("header_filter_by_lua_file"),
    142        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    143                          |NGX_CONF_TAKE1,
    144 @@ -378,7 +379,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    145        NGX_HTTP_LOC_CONF_OFFSET,
    146        0,
    147        (void *) ngx_http_lua_body_filter_inline },
    148 -
    149 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
    150      /* body_filter_by_lua_block { <inline script> } */
    151      { ngx_string("body_filter_by_lua_block"),
    152        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    153 @@ -387,7 +388,7 @@ static ngx_command_t ngx_http_lua_cmds[]
    154        NGX_HTTP_LOC_CONF_OFFSET,
    155        0,
    156        (void *) ngx_http_lua_body_filter_inline },
    157 -
    158 +#endif
    159      { ngx_string("body_filter_by_lua_file"),
    160        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
    161                          |NGX_CONF_TAKE1,
    162 @@ -395,14 +396,14 @@ static ngx_command_t ngx_http_lua_cmds[]
    163        NGX_HTTP_LOC_CONF_OFFSET,
    164        0,
    165        (void *) ngx_http_lua_body_filter_file },
    166 -
    167 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
    168      { ngx_string("balancer_by_lua_block"),
    169        NGX_HTTP_UPS_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
    170        ngx_http_lua_balancer_by_lua_block,
    171        NGX_HTTP_SRV_CONF_OFFSET,
    172        0,
    173        (void *) ngx_http_lua_balancer_handler_inline },
    174 -
    175 +#endif
    176      { ngx_string("balancer_by_lua_file"),
    177        NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1,
    178        ngx_http_lua_balancer_by_lua,
    179 @@ -509,14 +510,14 @@ static ngx_command_t ngx_http_lua_cmds[]
    180        NGX_HTTP_LOC_CONF_OFFSET,
    181        offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers),
    182        NULL },
    183 -
    184 +#ifndef NGX_LUA_NO_BY_LUA_BLOCK
    185      { ngx_string("ssl_certificate_by_lua_block"),
    186        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
    187        ngx_http_lua_ssl_cert_by_lua_block,
    188        NGX_HTTP_SRV_CONF_OFFSET,
    189        0,
    190        (void *) ngx_http_lua_ssl_cert_handler_inline },
    191 -
    192 +#endif
    193      { ngx_string("ssl_certificate_by_lua_file"),
    194        NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
    195        ngx_http_lua_ssl_cert_by_lua,