diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2023-10-02 15:59:00 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2023-10-02 15:59:00 +0100 |
commit | 135160934ab39c9a9ee26f7c0322003c1546d7ad (patch) | |
tree | 586680ee3c0525c15430605d68e66e8d33a945d8 /test | |
parent | 7fac9087424e1f7c4b82bfb8426aca197f1f8904 (diff) | |
download | unit-135160934ab39c9a9ee26f7c0322003c1546d7ad.tar.gz unit-135160934ab39c9a9ee26f7c0322003c1546d7ad.tar.bz2 |
Tests: added Java test with multiple headers.
This test reproduce https://github.com/nginx/unit/issues/923.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_java_application.py | 17 |
1 files changed, 17 insertions, 0 deletions
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') |