Skip to content

Commit 2bf7710

Browse files
committed
fixed the initial table sizes for the tables "ngx" and "ngx.req" to reflect recent changes.
1 parent 7befc2c commit 2bf7710

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/ngx_http_lua_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ static void
719719
ngx_http_lua_inject_ngx_api(lua_State *L, ngx_http_lua_main_conf_t *lmcf,
720720
ngx_log_t *log)
721721
{
722-
lua_createtable(L, 0 /* narr */, 99 /* nrec */); /* ngx.* */
722+
lua_createtable(L, 0 /* narr */, 116 /* nrec */); /* ngx.* */
723723

724724
lua_pushcfunction(L, ngx_http_lua_get_raw_phase_context);
725725
lua_setfield(L, -2, "_phase_ctx");
@@ -2090,7 +2090,7 @@ ngx_http_lua_inject_req_api(ngx_log_t *log, lua_State *L)
20902090
{
20912091
/* ngx.req table */
20922092

2093-
lua_createtable(L, 0 /* narr */, 23 /* nrec */); /* .req */
2093+
lua_createtable(L, 0 /* narr */, 24 /* nrec */); /* .req */
20942094

20952095
ngx_http_lua_inject_req_header_api(L);
20962096
ngx_http_lua_inject_req_uri_api(log, L);

t/062-count.t

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ __DATA__
3434
--- request
3535
GET /test
3636
--- response_body
37-
ngx: 99
37+
ngx: 116
3838
--- no_error_log
3939
[error]
4040

@@ -55,7 +55,7 @@ ngx: 99
5555
--- request
5656
GET /test
5757
--- response_body
58-
99
58+
116
5959
--- no_error_log
6060
[error]
6161

@@ -83,7 +83,7 @@ GET /test
8383
--- request
8484
GET /test
8585
--- response_body
86-
n = 99
86+
n = 116
8787
--- no_error_log
8888
[error]
8989

@@ -123,7 +123,7 @@ n = 1
123123
--- request
124124
GET /test
125125
--- response_body
126-
n = 23
126+
n = 24
127127
--- no_error_log
128128
[error]
129129

@@ -145,7 +145,7 @@ n = 23
145145
--- request
146146
GET /test
147147
--- response_body
148-
n = 23
148+
n = 24
149149
--- no_error_log
150150
[error]
151151

@@ -172,7 +172,7 @@ n = 23
172172
--- request
173173
GET /test
174174
--- response_body
175-
n = 23
175+
n = 24
176176
--- no_error_log
177177
[error]
178178

@@ -305,7 +305,7 @@ GET /t
305305
--- response_body_like: 404 Not Found
306306
--- error_code: 404
307307
--- error_log
308-
ngx. entry count: 99
308+
ngx. entry count: 116
309309

310310

311311

0 commit comments

Comments
 (0)