summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2020-07-23PHP: removing assertion to fix build on macOS.Max Romanov1-1/+5
The nxt_assert macro uses nxt_thread_context, which caused the following linker error when using it in the library: ld: illegal thread local variable reference to regular symbol _nxt_thread_context for architecture x86_64
2020-07-22Tests: switching stdout to blocking before printing log.Max Romanov1-3/+6
This is another attempt to fix the following error message: BlockingIOError: [Errno 11] write could not complete without blocking
2020-07-22Fixing buffer overflow check in discovery.Max Romanov1-1/+1
Incorrect check prevents Unit to start without modules. This issue was introduced in 4a3ec07f4b19.
2020-07-21PHP: logging in request context when possible.Valentin Bartenev1-2/+12
2020-07-21PHP: fixed incorrect time in interpreter error log messages.Valentin Bartenev1-5/+6
Previously, the log message callback used a generic log function, that relied on the process time cache. Since there were no time update calls in the application processes, all log lines were printed with the same time, usually correlated with the process start. Now, a non-cached logging function from libunit is used.
2020-07-21Fixed non-debug log time format in libunit.Valentin Bartenev1-0/+7
This makes log format used in libunit consistent with the daemon, where milliseconds are printed only in the debug log level. Currently a compile time switch is used, since there's no support for runtime changing of a log level for now. But in the future this should be a runtime condition, similar to nxt_log_time_handler().
2020-07-13Docker: run entrypoint scripts for unitd-debug as well.Konstantin Pavlov1-1/+1
2020-07-10Router: route patterns multi wildcards fix.Axel Duch2-3/+27
Matching 'start' and 'end' position now adjusted to avoid false matching. This is related to #434 issue on Github. Thanks to 洪志道 (Hong Zhi Dao).
2020-07-06Destroying temporary router configuration.Igor Sysoev2-34/+40
The lifespan of a listening socket is longer than both router configuration's and temporary router configuration's lifespan, so the sockets should be stored in persistent queues. Safety is ensured by the fact that the router processes only one new configuration at any time.
2020-07-04Router: route patterns multi wildcards support.Axel Duch3-157/+254
2020-06-26Tests: fixed opcache detection.Andrei Zeliankou1-1/+2
opcache_get_status() returns array, so square brackets should be used to access "opcache_enabled" value.
2020-06-24Tests: added chunked tests.Andrei Zeliankou1-0/+249
2020-06-23Upstream chunked transfer encoding support.Igor Sysoev7-98/+179
2020-06-23Decreased level of some socket close() errors.Igor Sysoev2-13/+36
2020-06-23Isolation: fixed build when features aren't detected.Tiago Natel de Moura5-129/+116
2020-06-23Python: fixed interpreter path in ./configure.Tiago Natel de Moura1-2/+1
2020-06-16Packages: added Fedora 32 support.Andrei Belov3-1/+79
2020-06-08Version bump.Valentin Bartenev1-2/+2
2020-05-28Adjusted tag 1.18.0 to include 9e14c63773be.Valentin Bartenev1-1/+1
2020-05-28Packages: fixed java configure script.1.18.0Tiago Natel de Moura4-5/+5
Now the configure script appends /server to --lib-path argument.
2020-05-28Added tag 1.18.0 for changeset a34bc498d976Valentin Bartenev1-0/+1
2020-05-28Generated Dockerfiles for Unit 1.18.0.Valentin Bartenev8-8/+8
2020-05-28Added version 1.18.0 CHANGES.Valentin Bartenev2-0/+58
2020-05-28Tests: Added rootfs tests.Tiago Natel de Moura12-35/+543
2020-05-28Added "rootfs" feature.Tiago Natel de Moura27-74/+1520
2020-03-09Refactor of process management.Tiago Natel de Moura28-1331/+1543
The process abstraction has changed to: setup(task, process) start(task, process_data) prefork(task, process, mp) The prefork() occurs in the main process right before fork. The file src/nxt_main_process.c is completely free of process specific logic. The creation of a process now supports a PROCESS_CREATED state. The The setup() function of each process can set its state to either created or ready. If created, a MSG_PROCESS_CREATED is sent to main process, where external setup can be done (required for rootfs under container). The core processes (discovery, controller and router) doesn't need external setup, then they all proceeds to their start() function straight away. In the case of applications, the load of the module happens at the process setup() time and The module's init() function has changed to be the start() of the process. The module API has changed to: setup(task, process, conf) start(task, data) As a direct benefit of the PROCESS_CREATED message, the clone(2) of processes using pid namespaces now doesn't need to create a pipe to make the child block until parent setup uid/gid mappings nor it needs to receive the child pid.
2020-05-28Moving nxt_stream_ident to shared memory.Max Romanov3-3/+31
This aims to avoid stream id clashes after router restart.
2020-05-28Added NULL check for engine->port.Max Romanov1-2/+4
This is required to handle REMOVE_PID messages if router engine initialization is incomplete.
2020-05-28Closing unsent file descriptors from port queue.Max Romanov1-0/+6
After a process exits, all ports linked to it from other processes should be closed. All unsent file descriptors in port queue, marked as "close after send", should be closed to avoid resource leakage.
2020-05-20Tests: print unit.log in case of errors.Andrei Zeliankou1-1/+2
Thanks to hongzhidao.
2020-05-20Static: fixed potential undefined behavior in memcpy().Valentin Bartenev1-1/+1
According to the C standard, pointer arguments passed to memcpy() calls shall still have valid values. NULL is considered as invalid. Found with GCC Static Analyzer.
2020-05-20PHP: building with PHP 8 (development version).Remi Collet2-1/+13
2020-05-15Fixed global constant declaration (appeared in 9af10e099d09).Valentin Bartenev1-1/+1
This fixes building with GCC 10, which is default to -fno-common. See: https://gcc.gnu.org/gcc-10/porting_to.html
2020-05-15Router: removed two unused assignments.Valentin Bartenev2-5/+2
This should resolve some static analyzers warnings.
2020-05-15Tests: added tests for "targets" option.Andrei Zeliankou4-0/+141
2020-05-15Tests: added test for encoding in the "pass" option.Andrei Zeliankou1-0/+55
2020-05-15Tests: style.Andrei Zeliankou34-43/+60
2020-05-15Tests: test_proxy_invalid simplified.Andrei Zeliankou1-79/+20
2020-05-14Tests: decode uri and args.Axel Duch1-35/+158
2020-05-14Router: decode uri and args.Axel Duch4-60/+381
2020-05-14PHP: implemented "targets" option.Valentin Bartenev11-260/+509
This allows to specify multiple subsequent targets inside PHP applications. For example: { "listeners": { "*:80": { "pass": "routes" } }, "routes": [ { "match": { "uri": "/info" }, "action": { "pass": "applications/my_app/phpinfo" } }, { "match": { "uri": "/hello" }, "action": { "pass": "applications/my_app/hello" } }, { "action": { "pass": "applications/my_app/rest" } } ], "applications": { "my_app": { "type": "php", "targets": { "phpinfo": { "script": "phpinfo.php", "root": "/www/data/admin", }, "hello": { "script": "hello.php", "root": "/www/data/test", }, "rest": { "root": "/www/data/example.com", "index": "index.php" }, } } } }
2020-05-14Configuration: URI encoding in the "pass" option.Valentin Bartenev5-66/+123
This is useful to escape "/" in path fragments. For example, in order to reference the application named "foo/bar": { "pass": "applications/foo%2Fbar" }
2020-05-12Tests: added respawn tests.Andrei Zeliankou1-0/+95
2020-05-12Waiting for router instead of reporting to user on config update.Max Romanov1-24/+25
2020-05-12Blocking config change when applying the initial router config.Max Romanov1-11/+32
2020-05-12Version bump.Valentin Bartenev1-2/+2
2020-04-24Tests: introduced module version specification in prerequisites.Andrei Zeliankou25-26/+38
2020-04-23Packages: added Ubuntu 20.04 "focal" support.Andrei Belov2-1/+13
2020-04-20Tests: skips adjusted.Andrei Zeliankou2-9/+21
2020-04-16Added tag 1.17.0 for changeset 4b13438632bcValentin Bartenev1-0/+1