File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use t::TestNginxLua;
14
14
15
15
repeat_each(2);
16
16
17
- plan tests => repeat_each() * 54 ;
17
+ plan tests => repeat_each() * 55 ;
18
18
19
19
# no_diff();
20
20
no_long_string();
@@ -456,3 +456,34 @@ Content-Encoding: gzip
456
456
--- no_error_log
457
457
[error]
458
458
459
+
460
+
461
+ === TEST 16: flush wait - gunzip
462
+ --- config
463
+ location /test {
464
+ gunzip on;
465
+ content_by_lua '
466
+ local f, err = io.open(ngx.var.document_root .. "/gzip.bin", "r")
467
+ if not f then
468
+ ngx.say("failed to open file: ", err)
469
+ return
470
+ end
471
+ local data = f:read(100)
472
+ ngx.header.content_encoding = "gzip"
473
+ ngx.print(data)
474
+ local ok, err = ngx.flush(true)
475
+ if not ok then
476
+ ngx.log(ngx.ERR, "flush failed: ", err)
477
+ return
478
+ end
479
+ ';
480
+ }
481
+ --- user_files eval
482
+ ">>> gzip.bin
483
+ \x1f\x8b\x08\x00\x00\x00\x00\x00\x02\x03\xb5\x19\xdb\x6e\x1b\xc7\xf5\x9d\x5f\x31\x5d\xa3\xa0\x84\x68\x2f\xbc\xc8\xb2\x28\x92\x85\x2d\x19\x8e\x01\x4b\x11\x6a\xa5\x69\x60\x18\xc2\x70\x77\xb8\x1c\x6b\xb9\xb3\x9e\x99\x25\xc5\x24\x06\x12\xe4\xa1\xcf\x45\x81\x16\x05\x8a\x3e\x14\x28\x5a\x04\x6d\x9f\xd3\xa2\x7d\xca\x0f\xd8\x4f\xfe\x81\xc0\xed\x67\xf4\x9c\xd9\x5d\x72\x79\x91\x25\x32\x91\x04\x51\x7b\xe6\x5c"
484
+ --- request
485
+ GET /test
486
+ --- ignore_response
487
+ --- no_error_log
488
+ [error]
489
+
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ time ngx-build $force $version \
44
44
--add-module=$root /../rds-json-nginx-module \
45
45
--add-module=$root /../coolkit-nginx-module \
46
46
--add-module=$root /../redis2-nginx-module \
47
+ --with-http_gunzip_module \
47
48
--with-select_module \
48
49
--with-poll_module \
49
50
--with-rtsig_module \
You can’t perform that action at this time.
0 commit comments