diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-07-08 19:23:33 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-07-08 19:23:33 +0300 |
commit | 4ea7d714056f63486a4c3a7d0953e513e898b4ba (patch) | |
tree | 5766ab203e279a6e609fbba5b4241af621919568 /test | |
parent | cc578b2e63745e8a0cf290669d0922bf176c45ff (diff) | |
download | unit-4ea7d714056f63486a4c3a7d0953e513e898b4ba.tar.gz unit-4ea7d714056f63486a4c3a7d0953e513e898b4ba.tar.bz2 |
Tests: added PATH_INFO variable test.
Diffstat (limited to 'test')
-rw-r--r-- | test/php/variables/index.php | 1 | ||||
-rw-r--r-- | test/test_php_application.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/php/variables/index.php b/test/php/variables/index.php index 8f2e3bfc..279efc79 100644 --- a/test/php/variables/index.php +++ b/test/php/variables/index.php @@ -4,6 +4,7 @@ $body = file_get_contents('php://input'); header('Content-Length: ' . strlen($body)); header('Request-Method: ' . $_SERVER['REQUEST_METHOD']); header('Request-Uri: ' . $_SERVER['REQUEST_URI']); +header('Path-Info: ' . $_SERVER['PATH_INFO']); header('Http-Host: ' . $_SERVER['HTTP_HOST']); header('Server-Protocol: ' . $_SERVER['SERVER_PROTOCOL']); header('Server-Software: ' . $_SERVER['SERVER_SOFTWARE']); diff --git a/test/test_php_application.py b/test/test_php_application.py index bf0d3bd1..ad520596 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -24,6 +24,7 @@ class TestPHPApplication(TestApplicationPHP): 'Connection': 'close', }, body=body, + url='/index.php/blah?var=val' ) self.assertEqual(resp['status'], 200, 'status') @@ -54,7 +55,8 @@ class TestPHPApplication(TestApplicationPHP): 'Connection': 'close', 'Content-Length': str(len(body)), 'Request-Method': 'POST', - 'Request-Uri': '/', + 'Path-Info': '/blah', + 'Request-Uri': '/index.php/blah?var=val', 'Http-Host': 'localhost', 'Server-Protocol': 'HTTP/1.1', 'Custom-Header': 'blah', |