Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2022-11-02 | PHP: allowed to specify URLs without a trailing '/'. | Andrew Clayton | 1 | -0/+44 | |
Both @lucatacconi & @mwoodpatrick reported what appears to be the same issue on GitHub. Namely that when using the PHP language module and trying to access a URL that is a directory but without specifying the trailing '/', they were getting a '503 Service Unavailable' error. Note: This is when _not_ using the 'script' option. E.g with the following config { "listeners": { "[::1]:8080": { "pass": "applications/php" } }, "applications": { "php": { "type": "php", "root": "/var/tmp/unit-php" } } } and with a directory path of /var/tmp/unit-php/foo containing an index.php, you would see the following $ curl http://localhost/foo <title>Error 503</title> Error 503 However $ curl http://localhost/foo/ would work and serve up the index.php This commit fixes the above so you get the desired behaviour without specifying the trailing '/' by doing the following 1] If the URL doesn't end in .php and doesn't have a trailing '/' then check if the requested path is a directory. 2) If it is a directory then create a 301 re-direct pointing to it. This matches the behaviour of the likes of nginx, Apache and lighttpd. This also matches the behaviour of the "share" action in Unit. This doesn't effect the behaviour of the 'script' option which bypasses the nxt_php_dynamic_request() function. This also adds a couple of tests to test/test_php_application.py to ensure this continues to work. Closes: <https://github.com/nginx/unit/issues/717> Closes: <https://github.com/nginx/unit/issues/753> Signed-off-by: Andrew Clayton <a.clayton@nginx.com> | |||||
2022-09-07 | Tests: minor fixes. | Andrei Zeliankou | 1 | -10/+1 | |
2022-04-11 | Tests: style. | Andrei Zeliankou | 1 | -7/+4 | |
2021-12-12 | Tests: fixed type of applications. | Andrei Zeliankou | 1 | -3/+3 | |
2021-12-11 | Tests: added more OPcache tests. | Andrei Zeliankou | 1 | -12/+53 | |
2021-12-10 | Tests: fixed path to the "php.ini" file. | Andrei Zeliankou | 1 | -2/+10 | |
2021-11-09 | Tests: PHP shared opcache test added. | Max Romanov | 1 | -0/+17 | |
2021-10-18 | Tests: style. | Andrei Zeliankou | 1 | -1/+0 | |
2021-05-07 | Tests: PHP test with getting variable before the script is loaded. | Andrei Zeliankou | 1 | -2/+12 | |
2021-04-08 | Tests: preserving unit.log when run without restart. | Max Romanov | 1 | -24/+15 | |
Introducing "unit.log.Log" class for "unit.log" file management. Moving "findall()" function into TestApplicationProto. Using "os.kill()" to send signals. | |||||
2021-04-05 | Tests: style. | Andrei Zeliankou | 1 | -5/+9 | |
2021-01-14 | Tests: added missing checks for configuration results. | Andrei Zeliankou | 1 | -15/+15 | |
2021-01-13 | Tests: style. | Andrei Zeliankou | 1 | -1/+0 | |
2021-01-12 | Tests: unit_stop() removed where possible. | Andrei Zeliankou | 1 | -6/+10 | |
Since wait_for_record() was introduced there is no need to stop Unit before parsing unit.log. | |||||
2020-12-10 | Tests: added tests for PHP_AUTH_* variables. | Andrei Zeliankou | 1 | -0/+58 | |
2020-12-06 | Tests: options moved to the separate class. | Andrei Zeliankou | 1 | -1/+1 | |
This change is necessary to separate the logic and prevent possible circular dependency. | |||||
2020-11-11 | Tests: added a test for fastcgi_finish_request() function. | Andrei Zeliankou | 1 | -0/+26 | |
2020-10-19 | Tests: fixed unit.log print. | Andrei Zeliankou | 1 | -5/+6 | |
2020-10-06 | PHP: compatibility with 8.0.0 RC1. | Valentin Bartenev | 1 | -5/+5 | |
This closes #474 PR on GitHub. | |||||
2020-10-07 | Tests: minor fixes. | Andrei Zeliankou | 1 | -2/+3 | |
2020-09-16 | Tests: migrated to the pytest. | Andrei Zeliankou | 1 | -287/+208 | |
2020-07-28 | Tests: added PHP test with time check in error log messages. | Andrei Zeliankou | 1 | -0/+26 | |
2020-05-15 | Tests: style. | Andrei Zeliankou | 1 | -1/+1 | |
2020-04-24 | Tests: introduced module version specification in prerequisites. | Andrei Zeliankou | 1 | -1/+1 | |
2020-04-14 | Tests: minor fixes and style. | Andrei Zeliankou | 1 | -4/+6 | |
2020-03-03 | Tests: chdir() and open() for PHP module. | Tiago Natel de Moura | 1 | -4/+131 | |
These tests ensure optimizations in the chdir calls don't break SAPI semantics. | |||||
2020-02-20 | Tests: added PHP test with invalid index extension only. | Andrei Zeliankou | 1 | -0/+30 | |
2020-01-23 | Tests: check for php extension. | Tiago Natel de Moura | 1 | -1/+11 | |
2019-09-14 | Tests: refactored prerequisites model. | Andrey Zelenkov | 1 | -1/+1 | |
2019-07-17 | Tests: added PHP tests with "script" and "index" options. | Andrey Zelenkov | 1 | -0/+39 | |
2019-07-08 | Tests: added PATH_INFO variable test. | Andrey Zelenkov | 1 | -1/+3 | |
2019-07-05 | PHP: improved response status code handling. | Valentin Bartenev | 1 | -0/+40 | |
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. | |||||
2019-05-30 | Tests: adjusted skipping tests. | Andrey Zelenkov | 1 | -2/+1 | |
2019-04-09 | Tests: speed up tests. | Andrey Zelenkov | 1 | -0/+3 | |
2019-04-09 | Tests: simplified module checking. | Andrey Zelenkov | 1 | -2/+1 | |
2019-03-28 | Tests: unit module refactoring. | Andrey Zelenkov | 1 | -6/+5 | |
2019-03-26 | Tests: style. | Andrey Zelenkov | 1 | -121/+209 | |
2019-03-01 | Tests: made tests compatible with PHP 5.3. | Andrey Zelenkov | 1 | -3/+3 | |
2019-02-28 | Tests: fixed PHP "disable_functions" and "disable_classes" tests. | Andrey Zelenkov | 1 | -64/+54 | |
2019-02-27 | Tests: added "Host" and "Connetion" headers where necessary. | Andrey Zelenkov | 1 | -5/+7 | |
Also minor header organizing. | |||||
2018-12-24 | Tests: more QUERY_STRING tests. | Andrey Zelenkov | 1 | -0/+27 | |
2018-11-28 | Tests: PHP directives "disable_classes" and "disable_functions". | Andrey Zelenkov | 1 | -0/+110 | |
2018-11-15 | Tests: added command line arguments parsing in tests. | Andrey Zelenkov | 1 | -1/+1 | |
Added the following command line arguments: -d, --detailed: Show detailed output for tests Usage examples: ./test/run.py --detailed python3 test/test_access_log.py --detailed python3 test/test_access_log.py -d TestUnitAccessLog.test_access_log_ipv6 -l, --log: Save unit.log after the test execution Usage examples: ./test/run.py -l python3 test/test_access_log.py -l python3 test/test_access_log.py --log TestUnitAccessLog.test_access_log_ipv6 | |||||
2018-09-06 | Tests: used relative path for configuration. | Andrey Zelenkov | 1 | -9/+9 | |
2018-07-11 | Tests: more php.ini options tests. | Andrey Zelenkov | 1 | -0/+74 | |
2018-06-07 | Tests: added tests for "precision" option in php.ini. | Andrey Zelenkov | 1 | -0/+12 | |
2018-05-22 | Tests: initial PHP application tests. | Andrey Zelenkov | 1 | -0/+122 | |