From 924165c90ba51dd4ffea2c45541d46af56352d73 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Fri, 5 Jul 2019 18:42:30 +0300 Subject: PHP: improved response status code handling. There's no reason to parse "http_status_line"; the PHP interpreter already does this. If the line contains a valid status code, it's assigned to "http_response_code". This also fixes invalid status line handling, where the nxt_int_parse() function returned -1; it was cast to unsigned, yielding response code 65535. --- test/php/header/index.php | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/php/header/index.php (limited to 'test/php') diff --git a/test/php/header/index.php b/test/php/header/index.php new file mode 100644 index 00000000..1aa5ca04 --- /dev/null +++ b/test/php/header/index.php @@ -0,0 +1,4 @@ + -- cgit From 4ea7d714056f63486a4c3a7d0953e513e898b4ba Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Mon, 8 Jul 2019 19:23:33 +0300 Subject: Tests: added PATH_INFO variable test. --- test/php/variables/index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'test/php') 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']); -- cgit From 4153fad89dfeb694bf7f0c94d4c02da50af1852b Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Wed, 17 Jul 2019 16:50:24 +0300 Subject: Tests: added PHP tests with "script" and "index" options. --- test/php/script/phpinfo.php | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 test/php/script/phpinfo.php (limited to 'test/php') diff --git a/test/php/script/phpinfo.php b/test/php/script/phpinfo.php new file mode 100644 index 00000000..cf608608 --- /dev/null +++ b/test/php/script/phpinfo.php @@ -0,0 +1,3 @@ + -- cgit