File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,8 @@ ngx_http_lua_ngx_req_get_headers(lua_State *L)
331
331
332
332
if (max > 0 && count > max ) {
333
333
count = max ;
334
+ ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
335
+ "lua exceeding request header limit %d" , max );
334
336
}
335
337
336
338
lua_createtable (L , 0 , count );
@@ -378,9 +380,6 @@ ngx_http_lua_ngx_req_get_headers(lua_State *L)
378
380
& header [i ].key , & header [i ].value );
379
381
380
382
if (-- count == 0 ) {
381
- ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
382
- "lua hit request header limit %d" , max );
383
-
384
383
return 1 ;
385
384
}
386
385
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use t::TestNginxLua;
9
9
10
10
repeat_each(2);
11
11
12
- plan tests => repeat_each() * (2 * blocks() + 18 );
12
+ plan tests => repeat_each() * (2 * blocks() + 19 );
13
13
14
14
# no_diff();
15
15
# no_long_string();
@@ -34,6 +34,9 @@ Bar: baz
34
34
--- response_body
35
35
Foo: bar
36
36
Bar: baz
37
+ --- log_level: debug
38
+ --- no_error_log
39
+ lua exceeding request header limit
37
40
38
41
39
42
@@ -427,7 +430,7 @@ for my $k (@k) {
427
430
CORE::join("", @k);
428
431
--- timeout: 4
429
432
--- error_log
430
- lua hit request header limit 100
433
+ lua exceeding request header limit 100
431
434
432
435
433
436
@@ -475,7 +478,7 @@ for my $k (@k) {
475
478
CORE::join("", @k);
476
479
--- timeout: 4
477
480
--- error_log
478
- lua hit request header limit 102
481
+ lua exceeding request header limit 102
479
482
480
483
481
484
You can’t perform that action at this time.
0 commit comments