diff options
author | Ippolitov Igor <iippolitov@nginx.com> | 2023-10-19 12:50:39 +0100 |
---|---|---|
committer | Ippolitov Igor <iippolitov@nginx.com> | 2023-10-19 12:50:39 +0100 |
commit | c43629880472bba8d389dfb0b7ae6d883b0ba499 (patch) | |
tree | acecdcb36cfb85fac3d8cdbfbe473c26ac2e2686 /test/test_php_application.py | |
parent | 8c4425ccb9a413e8d0506e0254f0e84bd89a32a6 (diff) | |
parent | fb33ec86a3b6ca6a844dfa6980bb9e083094abec (diff) | |
download | unit-c43629880472bba8d389dfb0b7ae6d883b0ba499.tar.gz unit-c43629880472bba8d389dfb0b7ae6d883b0ba499.tar.bz2 |
Merged with the default branch.1.31.1-1
Diffstat (limited to 'test/test_php_application.py')
-rw-r--r-- | test/test_php_application.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py index 6c1f227b..17440909 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -171,6 +171,36 @@ def test_php_application_query_string_empty(): assert resp['headers']['Query-String'] == '', 'query string empty' +def test_php_application_query_string_rewrite(): + assert 'success' in client.conf( + { + "listeners": {"*:7080": {"pass": "routes"}}, + "routes": [ + { + "action": { + "rewrite": "/new", + "pass": "applications/query_string", + }, + }, + ], + "applications": { + "query_string": { + "type": client.get_application_type(), + "processes": {"spare": 0}, + "root": f"{option.test_dir}/php/query_string", + "script": "index.php", + } + }, + }, + ) + + assert client.get(url='/old')['status'] == 200 + + resp = client.get(url='/old?arg=val') + assert resp['status'] == 200 + assert resp['headers']['Query-String'] == 'arg=val' + + def test_php_application_fastcgi_finish_request(findall, unit_pid): client.load('fastcgi_finish_request') |