From 135160934ab39c9a9ee26f7c0322003c1546d7ad Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 2 Oct 2023 15:59:00 +0100 Subject: Tests: added Java test with multiple headers. This test reproduce https://github.com/nginx/unit/issues/923. --- test/test_java_application.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/test_java_application.py b/test/test_java_application.py index a8814583..eefc5c79 100644 --- a/test/test_java_application.py +++ b/test/test_java_application.py @@ -875,6 +875,23 @@ def test_java_application_get_headers(): assert headers['X-Reply-0'] == 'blah', 'get headers' assert headers['X-Reply-1'] == 'blah', 'get headers 2' +def test_java_application_many_headers(): + client.load('get_headers') + + value = '0123456789' * 10 + + headers = client.get( + headers={ + 'X-Header': [value] * 100, + 'Content-Type': 'text/html', + 'Host': 'localhost', + 'Connection': 'close', + } + )['headers'] + + for i in range(0, 99): + assert headers[f'X-Reply-{i}'] == value, 'many headers' + def test_java_application_get_headers_empty(): client.load('get_headers') -- cgit