History log of /unit/src/ (Results 51 – 75 of 1207)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
2156:bfa61f165c7c01-Jul-2022 Alejandro Colomar

Added missing inline keyword.

2155:f1b4e7b942c401-Jul-2022 Alejandro Colomar

Added missing inline keyword.

2154:68987edde84a23-Jun-2022 Alejandro Colomar

Fixed incorrect code.

The #endif was misplaced by accident during a refactor:
<https://github.com/nginx/unit/commit/029942f4eb7196c2cff0d0e26bc6ff274138f7d8>.

clang(1)'s -Wunreachable-code-break (i

Fixed incorrect code.

The #endif was misplaced by accident during a refactor:
<https://github.com/nginx/unit/commit/029942f4eb7196c2cff0d0e26bc6ff274138f7d8>.

clang(1)'s -Wunreachable-code-break (implied by -Weverything) catches
that, but it is only produced for code compiled without support
for Unix sockets, which is probably the reason it was undetected:
no-one seems to be compiling Unit without Unix sockets support (at
least with clang(1)).

show more ...

2153:37bccff06c9f18-Jun-2022 Alejandro Colomar

Replaced Linux syscall macros by libc macros.

User-space programs should use the SYS_*form, as documented in
syscall(2). That also adds compatibility to non-Linux systems.

2151:fab207c6836c19-Jun-2022 Alejandro Colomar

Removed code used when NXT_HAVE_POSIX_SPAWN is false.

posix_spawn(3POSIX) was introduced by POSIX.1d
(IEEE Std 1003.1d-1999), and was later consolidated in
POSIX.1-2001, requiring it in all POSIX-co

Removed code used when NXT_HAVE_POSIX_SPAWN is false.

posix_spawn(3POSIX) was introduced by POSIX.1d
(IEEE Std 1003.1d-1999), and was later consolidated in
POSIX.1-2001, requiring it in all POSIX-compliant systems.
It's safe to assume it's always available, more than 20 years
after its standardization.

Link: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/spawn.h.html>

show more ...

2149:7a53238e050d13-Jul-2022 Zhidao HONG

HTTP: added more variables.

This commit adds the following variables:
$remote_addr, $time_local, $request_line, $status,
$body_bytes_sent, $header_referer, $header_user_agent.

2147:7bf58b1b18c413-Jul-2022 Zhidao HONG

Var: dynamic variables support.

This commit adds the variables $arg_NAME, $header_NAME, and $cookie_NAME.

2146:362258b173b313-Jul-2022 Zhidao HONG

Var: optimization to get rid of nxt_var_cache_find().

No functional changes.

2145:ee1e319c8ed824-Apr-2022 Timo Stark

Increased readtimeout for configuration endpoint.

Closes: <https://github.com/nginx/unit/issues/676>

2143:52dda4e0586816-Jun-2022 Andrew Clayton

Unit: removed a useless assignment.

As was pointed out by the cppcheck[0] static code analysis utility there
was a useless assignment in nxt_unit_request_read(). The size parameter
is passed in by v

Unit: removed a useless assignment.

As was pointed out by the cppcheck[0] static code analysis utility there
was a useless assignment in nxt_unit_request_read(). The size parameter
is passed in by value and was being modified without being used again.

[0]: https://cppcheck.sourceforge.io/

show more ...

2142:0729b05c45d416-Jun-2022 Andrew Clayton

Unit: avoided needlessly setting lib in nxt_unit_shm_open().

As was pointed out by the cppcheck[0] static code analysis utility, lib
was being set in nxt_unit_shm_open() regardless of platform when

Unit: avoided needlessly setting lib in nxt_unit_shm_open().

As was pointed out by the cppcheck[0] static code analysis utility, lib
was being set in nxt_unit_shm_open() regardless of platform when in fact
it's only used when (NXT_HAVE_MEMFD_CREATE || NXT_HAVE_SHM_OPEN).

Move the variable declaration & definition to be within the

#if (NXT_HAVE_MEMFD_CREATE || NXT_HAVE_SHM_OPEN)

block.

[0]: https://cppcheck.sourceforge.io/

show more ...

2141:c820888cd98c16-Jun-2022 Andrew Clayton

Socket: removed useless port < 1 check.

In src/nxt_sockaddr.c::nxt_job_sockaddr_inet_parse() there is a check
that port > 0 then there is a check that port < 1 || port > 65535, well
we _know_ it can

Socket: removed useless port < 1 check.

In src/nxt_sockaddr.c::nxt_job_sockaddr_inet_parse() there is a check
that port > 0 then there is a check that port < 1 || port > 65535, well
we _know_ it can't be less than 1.

show more ...

2140:423ecac30dba16-Jun-2022 Andrew Clayton

Marked a couple of variables 'const'.

As was pointed out by the cppcheck[0] static code analysis utility we
can mark a couple of variables as 'const'. This acts as a hint to the
compiler about our i

Marked a couple of variables 'const'.

As was pointed out by the cppcheck[0] static code analysis utility we
can mark a couple of variables as 'const'. This acts as a hint to the
compiler about our intentions and the compiler will tell us when we
deviate from them.

[0]: https://cppcheck.sourceforge.io/

show more ...

2139:99d792169ffb16-Jun-2022 Andrew Clayton

Constified numerous function parameters.

As was pointed out by the cppcheck[0] static code analysis utility we
can mark numerous function parameters as 'const'. This acts as a hint to
the compiler a

Constified numerous function parameters.

As was pointed out by the cppcheck[0] static code analysis utility we
can mark numerous function parameters as 'const'. This acts as a hint to
the compiler about our intentions and the compiler will tell us when we
deviate from them.

[0]: https://cppcheck.sourceforge.io/

show more ...

2137:96f3ac16391b06-Jun-2022 Alejandro Colomar

Static: Fixed finding the file extension.

The code for finding the extension made a few assumptions that are
no longer true. It didn't account for pathnames that didn't
contain '/', including the e

Static: Fixed finding the file extension.

The code for finding the extension made a few assumptions that are
no longer true. It didn't account for pathnames that didn't
contain '/', including the empty string, or the NULL string. That
code was used with "share", which always had a '/', but now it's
also used with "index", which should not have a '/' in it.

This fix works by limiting the search to the beginning of the
string, so that if no '/' is found in it, it doesn't continue
searching before the beginning of the string.

This also happens to work for NULL. It is technically Undefined
Behavior, as we rely on `NULL + 0 == NULL` and `NULL - NULL == 0`.
But that is the only sane behavior for an implementation, and all
existing POSIX implementations will Just Work for this code.

Relying on this UB is useful, because we don't need to add an
explicit check for NULL, and therefore we have faster code.
Although the current code can't have a NULL, I expect that when we
add support for variables in the index, it will be NULL in some
cases.

Link: <https://stackoverflow.com/q/67291052/6872717>

The same code seems to be defined behavior in C++, which normally
will share implementation in the compiler for these cases, and
therefore it is really unlikely to be in trouble.

Link: <https://stackoverflow.com/q/59409034/6872717>

show more ...

2133:46433e3cef4520-Jun-2022 Zhidao HONG

Router: forwared header replacement.

2132:34d63ed988dc20-Jun-2022 Zhidao HONG

Router: introduced nxt_http_forward_t.

This makes the replacement of forwarded request header
like client_ip and protocol more generic.
It's a prerequirement for protocol replacement.

No functional

Router: introduced nxt_http_forward_t.

This makes the replacement of forwarded request header
like client_ip and protocol more generic.
It's a prerequirement for protocol replacement.

No functional changes.

show more ...

2131:aea375f03b0b20-Jun-2022 Zhidao HONG

Router: refactored nxt_router_conf_create().

No functional changes.

2128:1ed9f036a2df15-Jun-2022 Zhidao HONG

Var: relocated nxt_var_is_const() and nxt_var_raw().

No functional changes.

2126:8542c8141a1307-Jun-2022 Max Romanov

Removing unused tracking fields and functions.

The message tracking is unused since 1d84b9e4b459 commit.

This fixes the issue found by Coverity (CID 376263).

2125:e89e7ff7a4eb07-Jun-2022 Zhidao HONG

Router: removed unused code in nxt_router_conf_error().

No functional changes.

2124:6e74a08303ad02-Jun-2022 Zhidao HONG

Summary: Var: removing all async stuff.

No functional changes.

2123:36000da0aa5b19-May-2022 Zhidao HONG

HTTP: generalized uri encoding.

No functional changes.

Revision tags: 1.27.0-1, 1.27.0
2117:0e4bb7b44a6302-Jun-2022 Andrei Zeliankou

Node.js: fixed ES modules format in loader.mjs.

Before Node.js v16.14.0 the "format" value in defaultResolve
was ignored so error was hidden. For more information see:
https://github.com/nodejs/nod

Node.js: fixed ES modules format in loader.mjs.

Before Node.js v16.14.0 the "format" value in defaultResolve
was ignored so error was hidden. For more information see:
https://github.com/nodejs/node/pull/40980

show more ...

2115:07240703eab801-Jun-2022 Andrei Zeliankou

Logging a NULL pointer instead of passing it in the memcpy().

12345678910>>...49