summaryrefslogtreecommitdiffhomepage
path: root/test/python (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-14Python: Added "prefix" to configuration.OutOfFocus44-0/+51
This patch gives users the option to set a `"prefix"` attribute for Python applications, either at the top level or for specific `"target"`s. If the attribute is present, the value of `"prefix"` must be a string beginning with `"/"`. If the value of the `"prefix"` attribute is longer than 1 character and ends in `"/"`, the trailing `"/"` is stripped. The purpose of the `"prefix"` attribute is to set the `SCRIPT_NAME` context value for WSGI applications and the `root_path` context value for ASGI applications, allowing applications to properly route requests regardless of the path that the server uses to expose the application. The context value is only set if the request's URL path begins with the value of the `"prefix"` attribute. In all other cases, the `SCRIPT_NAME` or `root_path` values are not set. In addition, for WSGI applications, the value of `"prefix"` will be stripped from the beginning of the request's URL path before it is sent to the application. Reviewed-by: Andrei Zeliankou <zelenkov@nginx.com> Reviewed-by: Artem Konev <artem.konev@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
2022-09-07Tests: minor fixes.Andrei Zeliankou1-1/+0
2022-06-20Tests: forwarded header replacement tests.Zhidao HONG1-0/+10
2022-04-11Tests: style.Andrei Zeliankou1-5/+7
2021-10-18Tests: style.Andrei Zeliankou7-11/+5
2021-08-12Tests: client IP address replacement.Oisin Canty1-0/+4
2021-07-29Application restart introduced.Max Romanov3-0/+24
When processing a restart request, the router sends a QUIT message to all existing processes of the application. Then, a new shared application port is created to ensure that new requests won't be handled by the old processes of the application.
2021-05-24Tests: test_settings_send_timeout improved.Andrei Zeliankou1-0/+6
Data length adjusts depending on socket buffer size when it's possible.
2021-05-20Tests: Python targets.Oisin Canty3-4/+74
2021-04-05Tests: style.Andrei Zeliankou29-181/+218
2021-02-04Tests: added tests for "path" option in Python application.Andrei Zeliankou1-0/+8
2020-11-19Tests: added tests for a "discard_unsafe_fields" option.Andrei Zeliankou1-0/+9
2020-11-10Python: supporting ASGI legacy protocol.Max Romanov2-0/+30
Introducing manual protocol selection for 'universal' apps and frameworks.
2020-11-05Tests: added Python threading tests.Max Romanov2-0/+42
2020-10-05Tests: added ASGI Lifespan.Andrei Zeliankou4-0/+43
2020-10-01Tests: added ASGI HTTP applications.Max Romanov8-0/+195
2020-10-01Tests: added ASGI WebSocket.Max Romanov2-0/+43
2020-09-21Tests: changing Python application callable name.Max Romanov1-0/+7
2020-05-28Tests: Added rootfs tests.Tiago Natel de Moura1-0/+31
2020-04-03Tests: use "return" action in upstream tests.Andrei Zeliankou4-24/+1
2020-03-30Handling change file message in libunit.Max Romanov1-1/+1
This is required for proper log file rotation action.
2020-03-12Tests: added Python input readline and iterator tests.Max Romanov4-3/+55
2020-03-12Tests: round robin upstream tests.Andrei Zeliankou3-0/+24
2020-02-05Tests: added test for uploading files with SSL.Tiago Natel de Moura1-0/+27
* * * [mq]: multipart
2019-11-11Tests: added tests for setting user and group.Tiago Natel1-0/+18
2019-11-14Tests: Python exception tests.Andrei Zeliankou1-0/+45
2019-11-14Tests: proxy tests.Andrei Zeliankou1-0/+25
2019-11-13Tests: added Python test with threading.Andrei Zeliankou1-0/+33
2019-10-23Tests: added USR1 signal test for unit.log.Andrey Zelenkov1-0/+9
2019-10-23Tests: added flush() in "errors_write" Python application.Andrey Zelenkov1-0/+1
2019-04-09Tests: speed up tests.Andrey Zelenkov1-1/+0
2019-02-27Tests: "Host" header tests.Andrey Zelenkov1-0/+7
2018-08-06Unit application library.Max Romanov3-3/+6
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.
2018-05-29Tests: configuration of environment variables.Andrey Zelenkov1-0/+13
2018-05-21Tests: added tests for SERVER_SOFTWARE variable.Andrey Zelenkov1-0/+1
2018-04-26Tests: added test for callable write() in Python.Andrey Zelenkov1-0/+5
2018-04-05Tests: added Python test with not iterable object.Andrey Zelenkov3-0/+9
2018-04-02Tests: more Python tests.Andrey Zelenkov13-6/+67
2018-04-02Tests: added Python test with iterator context.Andrey Zelenkov1-0/+23
2018-03-16Tests: HTTP header field and value tests.Andrey Zelenkov1-0/+7
2018-02-20Tests: reworked python tests with application.Andrey Zelenkov7-0/+58