History log of /unit/src/nxt_var.c (Results 1 – 15 of 15)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2504:c559ee0041ec 19-Jun-2023 Zhidao HONG

Variables refactoring.

This commit is to reimplement the variables with an unknown field
such as $header_{name} to make the parsing more generic,
it's a preparation for supporting response header va

Variables refactoring.

This commit is to reimplement the variables with an unknown field
such as $header_{name} to make the parsing more generic,
it's a preparation for supporting response header variables.

show more ...


# 2489:b37326158d10 24-May-2023 Zhidao HONG

HTTP: fixed variable caching.

When a variable is accessed in the Unit configuration, the value is cached.
This was useful prior to the URI rewrite feature, but now that the URI (more
precisely, the

HTTP: fixed variable caching.

When a variable is accessed in the Unit configuration, the value is cached.
This was useful prior to the URI rewrite feature, but now that the URI (more
precisely, the request target) can be rewritten, the contents of the variable
$uri (which contains the path part of the request target, and is decoded)
should not be cached anymore, or at least the cached value should be invalidated
after a URI rewrite.

Example:

{
"rewrite": "/prefix$uri",
"share": "$uri"
}

For a request line like GET /foo?bar=baz HTTP/1.1\r\n, the expected file
served in the response would be /prefix/foo, but due to the caching issue,
Unit currently serves /foo.

show more ...


Revision tags: 1.30.0-1, 1.30.0, 1.29.1-1, 1.29.1, 1.29.0-1, 1.29.0
# 2246:5f4056478375 20-Nov-2022 Zhidao HONG

Var: separating nxt_tstr_t from nxt_var_t.

It's for the introduction of njs support.
For each option that supports native variable and JS template literals introduced next,
it's unified as template

Var: separating nxt_tstr_t from nxt_var_t.

It's for the introduction of njs support.
For each option that supports native variable and JS template literals introduced next,
it's unified as template string.

No functional changes.

show more ...


# 2243:dd668fe8d827 20-Nov-2022 Zhidao HONG

Var: improved variable parsing with empty names.

Unit parsed the case of "$uri$$host" into unknown variables.
This commit makes it invalid variable instead.


# 2232:1fb2182a4d03 02-Nov-2022 Alejandro Colomar

Removed the unsafe nxt_memchr() wrapper for memchr(3).

The casts are unnecessary, since memchr(3)'s argument is 'const void *'.
It might have been necessary in the times of K&R, where 'void *' didn'

Removed the unsafe nxt_memchr() wrapper for memchr(3).

The casts are unnecessary, since memchr(3)'s argument is 'const void *'.
It might have been necessary in the times of K&R, where 'void *' didn't
exist. Nowadays, it's unnecessary, and _very_ unsafe, since casts can
hide all classes of bugs by silencing most compiler warnings.

The changes from nxt_memchr() to memchr(3) were scripted:

$ find src/ -type f \
| grep '\.[ch]$' \
| xargs sed -i 's/nxt_memchr/memchr/'

Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>

show more ...


Revision tags: 1.28.0-1, 1.28.0
# 2166:64a3527f65ad 28-Jul-2022 Zhidao HONG

Log: customizable access log format.


# 2147:7bf58b1b18c4 13-Jul-2022 Zhidao HONG

Var: dynamic variables support.

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


# 2146:362258b173b3 13-Jul-2022 Zhidao HONG

Var: optimization to get rid of nxt_var_cache_find().

No functional changes.


# 2128:1ed9f036a2df 15-Jun-2022 Zhidao HONG

Var: relocated nxt_var_is_const() and nxt_var_raw().

No functional changes.


# 2124:6e74a08303ad 02-Jun-2022 Zhidao HONG

Summary: Var: removing all async stuff.

No functional changes.


Revision tags: 1.27.0-1, 1.27.0
# 2052:1f74b13eb7ca 02-Dec-2021 Zhidao HONG

Fixed debug message broken in 45b25ffb2e8c.


Revision tags: 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0
# 1959:45b25ffb2e8c 28-Sep-2021 Zhidao HONG

Static: variables in the "chroot" option.


# 1954:8f18a05d4c58 07-Sep-2021 Zhidao HONG

Router: refactored variable pass.

Since the "pass" option supports both strings and variables, a generic
nxt_var_t structure can be used in the configuration phase, and the "name"
field in actions i

Router: refactored variable pass.

Since the "pass" option supports both strings and variables, a generic
nxt_var_t structure can be used in the configuration phase, and the "name"
field in actions is redundant.

No functional changes.

show more ...


# 1953:6b3c68839a11 06-Sep-2021 Zhidao HONG

Var: keeping raw variable string for debug.


Revision tags: 1.25.0-1, 1.25.0, 1.24.0-1, 1.24.0, 1.23.0-1, 1.23.0, 1.22.0-1, 1.22.0, 1.21.0-1, 1.21.0, 1.20.0-1, 1.20.0, 1.19.0-1, 1.19.0
# 1563:d32bc428f46b 12-Aug-2020 Valentin Bartenev

Basic variables support.