Home
last modified time | relevance | path

Searched hist:10 (Results 76 – 100 of 248) sorted by relevance

12345678910

/unit/test/unit/applications/
H A Dtls.pydiff 2066:242192963d93 Mon Jan 31 23:10:00 UTC 2022 Andrei Zeliankou <zelenkov@nginx.com> Tests: removed TestApplicationTLS.get_server_certificate().

distutils.version is replaced by packaging.version. Also minor style fixes.
diff 1388:375fcf0e75a7 Tue Mar 10 18:10:00 UTC 2020 Andrei Zeliankou <zelenkov@nginx.com> Tests: redirect tests output to the stdout.
diff 1388:375fcf0e75a7 Tue Mar 10 18:10:00 UTC 2020 Andrei Zeliankou <zelenkov@nginx.com> Tests: redirect tests output to the stdout.
/unit/src/
H A Dnxt_sendbuf.cdiff 592:f2b174742bf3 Wed Mar 28 16:10:00 UTC 2018 Igor Sysoev <igor@sysoev.ru> nxt_port_buf_completion() and nxt_sendbuf_completion().

nxt_sendbuf_completion() has been renamed to nxt_port_buf_completion()
and moved to src/nxt_port_socket.c. nxt_sendbuf_completion0() has been
renamed to nxt_sendbuf_completion().
diff 14:556c5643cb8d Wed Feb 22 12:10:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Port changes.
H A Dnxt_port.cdiff 2050:d1298cc3f385 Fri Dec 03 00:10:00 UTC 2021 Valentin Bartenev <vbart@nginx.com> Merged with the 1.26 branch.
diff 2031:e8518399bc10 Wed Nov 24 10:11:00 UTC 2021 Max Romanov <max.romanov@nginx.com> Fixing alerts on router restart.

Splitting the process type connectivity matrix to 'keep ports' and 'send
ports'; the 'keep ports' matrix is used to clean up unnecessary ports after
forking a new process, and the 'send ports' matrix determines which process
types expect to get created process ports.

Unfortunately, the original single connectivity matrix no longer works because
of an application stop delay caused by prototypes. Existing applications
should not get the new router port at the moment.
diff 2015:4570130dd183 Wed Nov 24 10:11:00 UTC 2021 Max Romanov <max.romanov@nginx.com> Fixing alerts on router restart.

Splitting the process type connectivity matrix to 'keep ports' and 'send
ports'; the 'keep ports' matrix is used to clean up unnecessary ports after
forking a new process, and the 'send ports' matrix determines which process
types expect to get created process ports.

Unfortunately, the original single connectivity matrix no longer works because
of an application stop delay caused by prototypes. Existing applications
should not get the new router port at the moment.
diff 2014:f8a0992944df Wed Nov 24 10:11:00 UTC 2021 Max Romanov <max.romanov@nginx.com> Sending shared port to application prototype.

Application process started with shared port (and queue) already configured.
But still waits for PORT_ACK message from router to start request processing
(so-called "ready state").

Waiting for router confirmation is necessary. Otherwise, the application may
produce response and send it to router before the router have the information
about the application process. This is a subject of further optimizations.
diff 753:0f0094dc0f51 Fri Aug 10 16:27:00 UTC 2018 Max Romanov <max.romanov@nginx.com> Introducing app joint to accurate app release.

For accurate app descriptor release, it is required to count the number of
use counts. Use count increased when:
- app linked to configuration app queue;
- socket conf stores pointer to app;
- request for start app process posted to router service thread;

Application port has pointer to app, but it does not increase use count
to avoid use count loop.

Timer needs a pointer to nxt_timer_t which is stored in engine timers tree.
nxt_timer_t now resides in nxt_app_joint_t and does not lock the application.

Start process port RPC handlers is also linked to nxt_app_joint_t.

App joint (nxt_app_joint_t) is a 'weak pointer':
- single threaded;
- use countable;
- store pointer to nxt_app_t (which can be NULL);

nxt_app_t has pointer to nxt_app_joint_t and update its pointer to app.
diff 197:ae8f843e1fd4 Wed Aug 02 10:36:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added basic port error handler.
diff 196:7d6a0c9b661e Wed Aug 02 10:22:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Runtime processes protected with mutex.
diff 194:6281674ecf4f Wed Aug 02 10:21:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Implicit port read buffer completion.

To disable implicit completion, handler should reset msg->buf field.
diff 192:e8da77a2c293 Wed Aug 02 10:20:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Using port rpc in router->master start worker request.
diff 190:0dbd1ceae3a2 Wed Aug 02 10:14:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Port RPC interface introduced.

Usage:
1. Register handlers in incoming port with nxt_port_rpc_register_handler().
2. Use return value as a stream identifier for next nxt_port_socket_write().
H A Dnxt_controller.cdiff 357:b80698152fcd Tue Oct 10 16:46:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Basic validation errors.
diff 314:6cf55ca61038 Sun Sep 10 03:22:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Configuration persistence.

Now configuration survives server reloads.
diff 249:7ba0accb6a43 Wed Aug 30 00:10:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Controller: resending configuration to router after its restart.

Now router crash can be survived with less damage.
diff 248:4e30c21dd5be Wed Aug 30 00:10:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Controller: waiting for router before start to accept connections.

Previously, reconfiguration might fail right after the daemon start
if the router process wasn't ready yet.
diff 234:e0f17b03f52b Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure and command line option --control.
diff 193:c1ae75b4e17c Wed Aug 02 10:20:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Using port rpc in controller->router configuration update.
diff 189:3806ffda59cb Wed Aug 02 10:10:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added bit flags to type parameter of nxt_port_socket_write().

NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
diff 189:3806ffda59cb Wed Aug 02 10:10:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added bit flags to type parameter of nxt_port_socket_write().

NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
diff 135:2edf402f4c01 Mon Jul 10 14:55:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Controller: passing full configuration to router.
diff 112:6f1809436b10 Wed Jul 05 10:31:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Complex target parser copied from NGINX.

nxt_app_request_header_t fields renamed:
- 'path' renamed to 'target'.
- 'path_no_query' renamed to 'path' and contains parsed value.
H A Dnxt_port_socket.cdiff 1560:ef3da1be976d Wed Aug 12 10:37:00 UTC 2020 Max Romanov <max.romanov@nginx.com> Fixing issues found by static analyzer.
diff 974:c6d9f0ba74be Thu Feb 28 10:39:00 UTC 2019 Max Romanov <max.romanov@nginx.com> Reusing fragmented message buffers.

Fragmented message non-mmap buffer chain not freed nor reused before
this fix.

This closes #206 on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
diff 592:f2b174742bf3 Wed Mar 28 16:10:00 UTC 2018 Igor Sysoev <igor@sysoev.ru> nxt_port_buf_completion() and nxt_sendbuf_completion().

nxt_sendbuf_completion() has been renamed to nxt_port_buf_completion()
and moved to src/nxt_port_socket.c. nxt_sendbuf_completion0() has been
renamed to nxt_sendbuf_completion().
diff 197:ae8f843e1fd4 Wed Aug 02 10:36:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added basic port error handler.
diff 194:6281674ecf4f Wed Aug 02 10:21:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Implicit port read buffer completion.

To disable implicit completion, handler should reset msg->buf field.
diff 189:3806ffda59cb Wed Aug 02 10:10:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added bit flags to type parameter of nxt_port_socket_write().

NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
diff 189:3806ffda59cb Wed Aug 02 10:10:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added bit flags to type parameter of nxt_port_socket_write().

NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
diff 14:556c5643cb8d Wed Feb 22 12:10:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Port changes.
H A Dnxt_runtime.hdiff 314:6cf55ca61038 Sun Sep 10 03:22:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Configuration persistence.

Now configuration survives server reloads.
diff 234:e0f17b03f52b Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure and command line option --control.
diff 233:60bb2517a61d Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure and command line option --modules.
diff 231:6832cdee961e Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure option --pid=FILE.

A pid file name can be relative.
The default pid file name is "nginext.pid".
diff 230:e00ffd51df10 Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure options --prefix=PATH and --log=FILE.

A prefix is prepended to all relative names at configure stage.
There is no prefix by default.

A log file name can be relative.
The default log file name is "nginext.log".
diff 196:7d6a0c9b661e Wed Aug 02 10:22:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Runtime processes protected with mutex.
diff 193:c1ae75b4e17c Wed Aug 02 10:20:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Using port rpc in controller->router configuration update.
H A Dnxt_sprintf.cdiff 2569:942a1e97492a Tue Oct 10 06:30:00 UTC 2023 Zhidao HONG <z.hong@f5.com> Refactored nxt_vsprintf().
diff 72:e0cefa2185a5 Fri Jun 23 10:28:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Style and comment fixes.
diff 10:a8e68ed06863 Wed Feb 01 16:20:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> nxt_str_t changes.
H A Dnxt_h1proto.cdiff 1927:ac8d11e34427 Tue Aug 03 10:59:00 UTC 2021 Max Romanov <max.romanov@nginx.com> Fixed dead assignments.

Found by Clang Static Analyzer.
diff 1600:98d5a4af7282 Fri Sep 18 10:20:00 UTC 2020 Igor Sysoev <igor@sysoev.ru> Fixed segmentation fault during reconfiguration.

If idle connection was closed before h1proto had been allocated
then c->socket.data is NULL. This happens if nxt_h1p_idle_response()
is called by nxt_h1p_idle_close(). However, h1p->conn_write_tail
is used only in nxt_h1p_request_send() that would not be called
after nxt_h1p_idle_response().

The bug was introduced in f237e8c553fd.
diff 1599:28e8fd9ad657 Fri Sep 18 10:20:00 UTC 2020 Igor Sysoev <igor@sysoev.ru> Fixed segmentation fault during reconfiguration.
diff 1598:f060f13fe540 Fri Sep 18 10:20:00 UTC 2020 Igor Sysoev <igor@sysoev.ru> Fixed use-after-free error during reconfiguration.

An idle connection was not removed from idle connection list
if the connections detected that listening socket had been closed.
diff 1235:4d5998f60f20 Thu Oct 10 16:42:00 UTC 2019 Igor Sysoev <igor@sysoev.ru> Style fixes.
diff 1234:e56683f325ab Thu Oct 10 16:37:00 UTC 2019 Igor Sysoev <igor@sysoev.ru> Changed nxt_memcasecmp() interface to avoid casts.
diff 1110:4ca6df50b4d4 Wed Jul 24 10:47:00 UTC 2019 Axel Duch <axel.duch@nginx.com> Added routing based on request scheme.

Scheme matches exact string “http” or “https”.
diff 1011:0c41674ec79c Thu Mar 21 10:55:00 UTC 2019 Max Romanov <max.romanov@nginx.com> Adjusting request schema value according to connection tls state.

This closes #223 issue on GitHub.
diff 627:84169375647d Tue Apr 10 21:49:00 UTC 2018 Valentin Bartenev <vbart@nginx.com> Fixed pipelined request processing, broken by 9e16499b63f0.
diff 626:210b94412f8d Tue Apr 10 16:38:00 UTC 2018 Igor Sysoev <igor@sysoev.ru> Added "408 Request Timeout" error response.
H A Dnxt_http_route.cdiff 2380:3f702daa2f3f Tue Jan 10 21:03:00 UTC 2023 Alejandro Colomar <alx@nginx.com> HTTP: rewrote while loop as for loop.

This considerably simplifies the function, and will also help log the
iteration in which we are, which corresponds to the route array element.

Link: <https://github.com/nginx/unit/pull/824>
Link: <https://github.com/nginx/unit/pull/839>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Tested-by: Liam Crilly <liam@nginx.com>
Reviewed-by: Zhidao Hong <z.hong@f5.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
diff 1989:beee0e84eea0 Fri Nov 05 03:10:00 UTC 2021 Zhidao HONG <z.hong@f5.com> Router: fixed nxt_http_route_arguments_parse().

A valid query string argument is a string of "key=value\[&key=value ...\]"
pairs with non-empty keys. The fix removes invalid empty arguments.
diff 1785:144a42933ea7 Mon Feb 01 15:55:00 UTC 2021 Valentin Bartenev <vbart@nginx.com> Fixed building by GCC 10 with -flto and -O2.

This closes #467 issue on GitHub.
diff 1522:347a709fd01a Fri Jul 24 12:10:00 UTC 2020 Axel Duch <axel.duch@nginx.com> Minor changes and renaming an NJS artifact to NXT.

This is partially related to #434 issue on Github.
Thanks to 洪志道 (Hong Zhi Dao).
diff 1510:945e0b006858 Fri Jul 10 09:28:00 UTC 2020 Axel Duch <axel.duch@nginx.com> Router: route patterns multi wildcards fix.

Matching 'start' and 'end' position now adjusted to avoid false matching.

This is related to #434 issue on Github.
Thanks to 洪志道 (Hong Zhi Dao).
diff 1473:e07d5b451423 Thu May 14 10:15:00 UTC 2020 Valentin Bartenev <vbart@nginx.com> PHP: implemented "targets" option.

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"
},
}
}
}
}
diff 1472:88536f5bd13f Thu May 14 10:15:00 UTC 2020 Valentin Bartenev <vbart@nginx.com> Configuration: URI encoding in the "pass" option.

This is useful to escape "/" in path fragments. For example, in order
to reference the application named "foo/bar":

{
"pass": "applications/foo%2Fbar"
}
diff 1110:4ca6df50b4d4 Wed Jul 24 10:47:00 UTC 2019 Axel Duch <axel.duch@nginx.com> Added routing based on request scheme.

Scheme matches exact string “http” or “https”.
diff 1079:2596ef4ffb2c Mon Jun 10 15:47:00 UTC 2019 Igor Sysoev <igor@sysoev.ru> Cookie-based routing should be case-sensitive.
diff 1032:9c7364a2346a Wed Apr 10 10:47:00 UTC 2019 Igor Sysoev <igor@sysoev.ru> Added support for wildcards in the middle of match patterns.
diff 1032:9c7364a2346a Wed Apr 10 10:47:00 UTC 2019 Igor Sysoev <igor@sysoev.ru> Added support for wildcards in the middle of match patterns.
H A Dnxt_errno.cdiff 10:a8e68ed06863 Wed Feb 01 16:20:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> nxt_str_t changes.
H A Dnxt_string.hdiff 1481:235553af9977 Fri May 15 18:32:00 UTC 2020 Valentin Bartenev <vbart@nginx.com> Fixed global constant declaration (appeared in 9af10e099d09).

This fixes building with GCC 10, which is default to -fno-common.
See: https://gcc.gnu.org/gcc-10/porting_to.html
diff 1481:235553af9977 Fri May 15 18:32:00 UTC 2020 Valentin Bartenev <vbart@nginx.com> Fixed global constant declaration (appeared in 9af10e099d09).

This fixes building with GCC 10, which is default to -fno-common.
See: https://gcc.gnu.org/gcc-10/porting_to.html
diff 1234:e56683f325ab Thu Oct 10 16:37:00 UTC 2019 Igor Sysoev <igor@sysoev.ru> Changed nxt_memcasecmp() interface to avoid casts.
diff 10:a8e68ed06863 Wed Feb 01 16:20:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> nxt_str_t changes.
H A Dnxt_port_memory.cdiff 723:c48e0ee3a8b3 Thu Jul 12 13:06:00 UTC 2018 Max Romanov <max.romanov@nginx.com> Enabled body buffer shared memory segmentation.

Changeset #699 fixes shared memory allocation: continous buffer with
requested size should be allocated or function failed. For body longer
than 10 Mb, this allocation will definitely fails.

For body buffer it is not required to send it in a single continous buffer,
so, need to request minimum reasonable amount of shared memory and try to
extend it, if possible or allocate next buffer.
diff 197:ae8f843e1fd4 Wed Aug 02 10:36:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added basic port error handler.
diff 196:7d6a0c9b661e Wed Aug 02 10:22:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Runtime processes protected with mutex.
diff 195:23d842788d39 Wed Aug 02 10:22:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Freed mmap memory filled with 0xA5.
diff 189:3806ffda59cb Wed Aug 02 10:10:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added bit flags to type parameter of nxt_port_socket_write().

NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
diff 189:3806ffda59cb Wed Aug 02 10:10:00 UTC 2017 Max Romanov <max.romanov@nginx.com> Added bit flags to type parameter of nxt_port_socket_write().

NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
diff 138:59fc46dd5e1d Mon Jul 10 18:07:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Introducing thread-safe nxt_random().
/unit/pkg/deb/debian.module/
H A Dunit.example-go-configdiff 803:8d7088aa21fd Fri Oct 05 11:10:00 UTC 2018 Andrei Belov <defan@nginx.com> Packages: all CRLF newlines in examples converted to LF.
/unit/test/
H A Dtest_asgi_websockets.pydiff 2066:242192963d93 Mon Jan 31 23:10:00 UTC 2022 Andrei Zeliankou <zelenkov@nginx.com> Tests: removed TestApplicationTLS.get_server_certificate().

distutils.version is replaced by packaging.version. Also minor style fixes.
diff 1971:3410f9d2a662 Mon Oct 18 00:10:00 UTC 2021 Andrei Zeliankou <zelenkov@nginx.com> Tests: style.
diff 1629:094c3ab0c565 Mon Oct 05 10:05:00 UTC 2020 Andrei Zeliankou <zelenkov@nginx.com> Tests: added websocket test with long length.
H A Dtest_client_ip.pydiff 2066:242192963d93 Mon Jan 31 23:10:00 UTC 2022 Andrei Zeliankou <zelenkov@nginx.com> Tests: removed TestApplicationTLS.get_server_certificate().

distutils.version is replaced by packaging.version. Also minor style fixes.
diff 1971:3410f9d2a662 Mon Oct 18 00:10:00 UTC 2021 Andrei Zeliankou <zelenkov@nginx.com> Tests: style.
H A Dtest_asgi_targets.pydiff 2066:242192963d93 Mon Jan 31 23:10:00 UTC 2022 Andrei Zeliankou <zelenkov@nginx.com> Tests: removed TestApplicationTLS.get_server_certificate().

distutils.version is replaced by packaging.version. Also minor style fixes.
diff 1971:3410f9d2a662 Mon Oct 18 00:10:00 UTC 2021 Andrei Zeliankou <zelenkov@nginx.com> Tests: style.
H A Dtest_njs_modules.py2459:e5660c43e09c Wed May 10 12:02:00 UTC 2023 Andrei Zeliankou <zelenkov@nginx.com> Tests: added tests for NJS loadable modules.
H A Dtest_tls.pydiff 2066:242192963d93 Mon Jan 31 23:10:00 UTC 2022 Andrei Zeliankou <zelenkov@nginx.com> Tests: removed TestApplicationTLS.get_server_certificate().

distutils.version is replaced by packaging.version. Also minor style fixes.
diff 1971:3410f9d2a662 Mon Oct 18 00:10:00 UTC 2021 Andrei Zeliankou <zelenkov@nginx.com> Tests: style.
diff 1904:da7a4754f8bd Thu Jul 01 10:56:00 UTC 2021 Max Romanov <max.romanov@nginx.com> Fixing multiple TLS-enabled listeners initialization.

Because of the incorrect 'last' field assignment, multiple listeners with
a TLS certificate did not initialize properly, which caused a router crash
while establishing a connection.

Test with multiple TLS listeners added.

The issue was introduced in the c548e46fe516 commit.

This closes #561 issue on GitHub.
diff 1388:375fcf0e75a7 Tue Mar 10 18:10:00 UTC 2020 Andrei Zeliankou <zelenkov@nginx.com> Tests: redirect tests output to the stdout.
diff 1388:375fcf0e75a7 Tue Mar 10 18:10:00 UTC 2020 Andrei Zeliankou <zelenkov@nginx.com> Tests: redirect tests output to the stdout.
diff 1011:0c41674ec79c Thu Mar 21 10:55:00 UTC 2019 Max Romanov <max.romanov@nginx.com> Adjusting request schema value according to connection tls state.

This closes #223 issue on GitHub.
/unit/pkg/npm/
H A DMakefile816:e92e58984512 Tue Oct 23 10:06:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Added ability to publish Node.js module.
/unit/src/java/
H A Dnxt_jni_Request.cdiff 1011:0c41674ec79c Thu Mar 21 10:55:00 UTC 2019 Max Romanov <max.romanov@nginx.com> Adjusting request schema value according to connection tls state.

This closes #223 issue on GitHub.
/unit/
H A Dconfigurediff 2314:bc5a90e2e6e8 Thu Jul 14 11:25:00 UTC 2022 Alejandro Colomar <alx.manpages@gmail.com> Added default values for pathnames.

This allows one to simply run `./configure` and expect it to
produce sane defaults for an install.

Previously, without specifying `--prefix=...`, `make install`
would simply fail, recommending to set `--prefix` or `DESTDIR`,
but that recommendation was incomplete at best, since it didn't
set many of the subdirs needed for a good organization.

Setting `DESTDIR` was even worse, since that shouldn't even affect
an installation (it is required to be transparent to the
installation).

/usr/local is the historic Unix standard path to use for
installations from source made manually by the admin of the
system. Some package managers (Homebrew, I'm looking specifically
at you) have abused that path to install their things, but 1) it's
not our fault that someone else incorrectly abuses that path (and
they seem to be fixing it for newer archs; e.g., they started
using /opt/homebrew for Apple Silicon), 2) there's no better path
than /usr/local, 3) we still allow changing it for systems where
this might not be the desired path (MacOS Intel with hombrew), and
4) it's _the standard_.

See a related conversation with Ingo (OpenBSD maintainer):

On 7/27/22 16:16, Ingo Schwarze wrote:
> Hi Alejandro,
[...]
>
> Alejandro Colomar wrote on Sun, Jul 24, 2022 at 07:07:18PM +0200:
>> On 7/24/22 16:57, Ingo Schwarze wrote:
>>> Alejandro Colomar wrote on Sun, Jul 24, 2022 at 01:20:46PM +0200:
>
>>>> /usr/local is for sysadmins to build from source;
>
>>> Doing that is *very* strongly discouraged on OpenBSD.
>
>> I guess that's why the directory was reused in the BSDs to install ports
>> (probably ports were installed by the sysadmin there, and by extension,
>> ports are now always installed there, but that's just a guess).
>
> Maybe. In any case, the practice of using /usr/local for packages
> created from ports is significantly older than the recommendation
> to refrain from using upstream "make install" outside the ports
> framework.
>
> * The FreeBSD ports framework was started by Jordan Hubbard in 1993.
> * The ports framework was ported from FreeBSD to OpenBSD
> by Niklas Hallqvist in 1996.
> * NetBSD pkgsrc was forked from FreeBSD ports by Alistair G. Crooks
> and Hubert Feyrer in 1997.
>
> I failed to quickly find Jordan's original version, but rev. 1.1
> of /usr/ports/infrastructure/mk/bsd.port.mk in OpenBSD (dated Jun 3
> 22:47:10 1996 UTC) already said
>
> LOCALBASE ?= /usr/local
> PREFIX ?= ${LOCALBASE}
>
[...]
>> I had a discussion in NGINX Unit about it, and
>> the decission for now has been: "support prefix=/usr/local for default
>> manual installation through the Makefile, and let BSD users adjust to
>> their preferred path".
>
> That's an *excellent* solution for the task, thanks for doing it
> the right way. By setting PREFIX=/usr/local by default in the
> upstream Makefile, you are minimizing the work for *BSD porters.
>
> The BSD ports frameworks will typically run the upstreak "make install"
> with the variable DESTDIR set to a custom value, for example
>
> DESTDIR=/usr/ports/pobj/groff-1.23.0/fake-amd64
>
> so if the upstream Makefile sets PREFIX=/usr/local ,
> that's perfect, everything gets installed to the right place
> without an intervention by the person doing the porting.
>
> Of course, if the upstream Makefile would use some other PREFIX,
> that would not be a huge obstacle. All we have to do in that case
> is pass the option --prefix=/usr/local to the ./configure script,
> or something equivalent if the software isn't using GNU configure.
>
>> We were concerned that we might get collisions
>> with the BSD port also installing in /usr/local, but that's the least
>> evil (and considering BSD users don't typically run `make install`, it's
>> not so bad).
>
> It's not bad at all. It's perfect.
>
> Of course, if a user wants to install *without* the ports framework,
> they have to provide their own --prefix. But that's not an issue
> because it is easy to do, and installing without a port is discouraged
> anyway.

===

Directory variables should never contain a trailing slash (I've
learned that the hard way, where some things would break
unexpectedly). Especially, make(1) is likely to have problems
when things have double slashes or a trailing slash, since it
treats filenames as text strings. I've removed the trailing slash
from the prefix, and added it to the derivate variables just after
the prefix. pkg-config(1) also expects directory variables to have
no trailing slash.

===

I also removed the code that would set variables as depending on
the prefix if they didn't start with a slash, because that is a
rather non-obvious behavior, and things should not always depend
on prefix, but other dirs such as $(runstatedir), so if we keep
a similar behavior it would be very unreliable. Better keep
variables intact if set, or use the default if unset.

===

Print the real defaults for ./configure --help, rather than the actual
values.

===

I used a subdirectory under the standard /var/lib for NXT_STATE,
instead of a homemade "state" dir that does the same thing.

===

Modified the Makefile to create some dirs that weren't being
created, and also remove those that weren't being removed in
uninstall, probably because someone forgot to add them.

===

Add new options for setting the new variables, and rename some to be
consistent with the standard names. Keep the old ones at configuration
time for compatibility, but mark them as deprecated. Don't keep the old
ones at exec time.

===

A summary of the default config is:

Unit configuration summary:

bin directory: ............. "/usr/local/bin"
sbin directory: ............ "/usr/local/sbin"
lib directory: ............. "/usr/local/lib"
include directory: ......... "/usr/local/include"
man pages directory: ....... "/usr/local/share/man"
modules directory: ......... "/usr/local/lib/unit/modules"
state directory: ........... "/usr/local/var/lib/unit"
tmp directory: ............. "/tmp"

pid file: .................. "/usr/local/var/run/unit/unit.pid"
log file: .................. "/usr/local/var/log/unit/unit.log"

control API socket: ........ "unix:/usr/local/var/run/unit/control.unit.sock"

Link: <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>
Link: <https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html>
Reviewed-by: Artem Konev <a.konev@f5.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Tested-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Konstantin Pavlov <thresh@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
diff 314:6cf55ca61038 Sun Sep 10 03:22:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Configuration persistence.

Now configuration survives server reloads.
diff 236:f6d82ff59b74 Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configuration summary.
diff 235:467cff8f6def Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure and command line option --help.
diff 234:e0f17b03f52b Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure and command line option --control.
diff 233:60bb2517a61d Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure and command line option --modules.
diff 232:43f9808200cd Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure option --user=USER and --group=GROUP.
diff 231:6832cdee961e Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure option --pid=FILE.

A pid file name can be relative.
The default pid file name is "nginext.pid".
diff 230:e00ffd51df10 Sat Aug 26 10:37:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Added configure options --prefix=PATH and --log=FILE.

A prefix is prepended to all relative names at configure stage.
There is no prefix by default.

A log file name can be relative.
The default log file name is "nginext.log".
/unit/pkg/deb/debian/
H A Dunit.example.configdiff 803:8d7088aa21fd Fri Oct 05 11:10:00 UTC 2018 Andrei Belov <defan@nginx.com> Packages: all CRLF newlines in examples converted to LF.
/unit/src/test/
H A Dnxt_lvlhsh_test.cdiff 840:500c3525e10e Thu Nov 15 10:00:00 UTC 2018 Valentin Bartenev <vbart@nginx.com> Fixed lvlhsh test on 64-bit big-endian systems.

The nxt_murmur_hash2() generated 4-byte hash that was stored in uintptr_t,
which was 8 bytes long on 64-bit systems. At each iteration, it took the
previous key and hashed it again.

The problem was that it took only the first 4 bytes of the key, and these
4 bytes were always zero on 64-bit big-endian system. That resulted in
equal keys at each iteration.

The bug was discovered on IBM/S390x.
/unit/src/python/
H A Dnxt_python_asgi.hdiff 1697:73a335d2911d Tue Nov 10 19:27:00 UTC 2020 Max Romanov <max.romanov@nginx.com> Python: supporting ASGI legacy protocol.

Introducing manual protocol selection for 'universal' apps and frameworks.
/unit/pkg/docker/
H A DDockerfile.python3.12diff 2663:7e37f85fdc5b Mon Feb 19 00:59:00 UTC 2024 Dan Callahan <d.callahan@f5.com> Docker: Shallow clone the Unit repo

Saves on the order of 10 MBs of transfer for each build.

We call `rm -rf /usr/src/unit` later in this step, so the full repo has
never appeared in our published images anyway.

12345678910