From 1aabab0c26e83727fa23b66aff1f239c905017f3 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Fri, 17 Jan 2025 17:03:08 -0800 Subject: [PATCH] Tests: added request body test when body is in a file. --- nginx/t/js_request_body.t | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/nginx/t/js_request_body.t b/nginx/t/js_request_body.t index 350e7fb8..7a5005d4 100644 --- a/nginx/t/js_request_body.t +++ b/nginx/t/js_request_body.t @@ -51,12 +51,19 @@ http { client_body_in_file_only on; js_content test.body; } + + location /read_body_from_temp_file { + client_body_in_file_only clean; + js_content test.read_body_from_temp_file; + } } } EOF $t->write_file('test.js', <write_file('test.js', <try_run('no njs request body')->plan(3); +$t->try_run('no njs request body')->plan(4); ############################################################################### @@ -80,6 +92,8 @@ like(http_post('/in_file'), qr/request body is in a file/, 'request body in file'); like(http_post_big('/body'), qr/200.*^(1234567890){1024}$/ms, 'request body big'); +like(http_post_big('/read_body_from_temp_file'), + qr/200.*^(1234567890){1024}$/ms, 'request body big from temp file'); ############################################################################### -- 2.47.3