From: Dmitry Volyntsev Date: Sat, 18 Jan 2025 01:03:08 +0000 (-0800) Subject: Tests: added request body test when body is in a file. X-Git-Tag: 0.8.10~52 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=1aabab0c26e83727fa23b66aff1f239c905017f3;p=njs.git Tests: added request body test when body is in a file. --- 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'); ###############################################################################