diff options
-rw-r--r-- | test/php/fastcgi_finish_request/index.php | 2 | ||||
-rw-r--r-- | test/php/fastcgi_finish_request/server.php | 4 | ||||
-rw-r--r-- | test/test_php_application.py | 14 |
3 files changed, 18 insertions, 2 deletions
diff --git a/test/php/fastcgi_finish_request/index.php b/test/php/fastcgi_finish_request/index.php index a6211303..fbfae71b 100644 --- a/test/php/fastcgi_finish_request/index.php +++ b/test/php/fastcgi_finish_request/index.php @@ -8,4 +8,6 @@ if (!fastcgi_finish_request()) { } echo "4567"; + +include 'server.php'; ?> diff --git a/test/php/fastcgi_finish_request/server.php b/test/php/fastcgi_finish_request/server.php new file mode 100644 index 00000000..af71c5f2 --- /dev/null +++ b/test/php/fastcgi_finish_request/server.php @@ -0,0 +1,4 @@ +<?php +echo $_SERVER['REQUEST_METHOD']; +echo $_SERVER['HTTP_HOST']; +?> diff --git a/test/test_php_application.py b/test/test_php_application.py index 350ac0d0..66e2ef7d 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -98,9 +98,14 @@ class TestPHPApplication(TestApplicationPHP): def test_php_application_fastcgi_finish_request(self, unit_pid): self.load('fastcgi_finish_request') + assert 'success' in self.conf( + {"admin": {"auto_globals_jit": "1"}}, + 'applications/fastcgi_finish_request/options', + ) + assert self.get()['body'] == '0123' - os.kill(unit_pid, signal.SIGUSR1); + os.kill(unit_pid, signal.SIGUSR1) errs = self.findall(r'Error in fastcgi_finish_request') @@ -109,11 +114,16 @@ class TestPHPApplication(TestApplicationPHP): def test_php_application_fastcgi_finish_request_2(self, unit_pid): self.load('fastcgi_finish_request') + assert 'success' in self.conf( + {"admin": {"auto_globals_jit": "1"}}, + 'applications/fastcgi_finish_request/options', + ) + resp = self.get(url='/?skip') assert resp['status'] == 200 assert resp['body'] == '' - os.kill(unit_pid, signal.SIGUSR1); + os.kill(unit_pid, signal.SIGUSR1) errs = self.findall(r'Error in fastcgi_finish_request') |