Skip to content

Commit 1b8a6b1

Browse files
author
pangpang
committed
update nginx to 1.25.2
1 parent 8bbcd19 commit 1b8a6b1

32 files changed

+721
-401
lines changed

CHANGES

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11

2+
Changes with nginx 1.25.2 15 Aug 2023
3+
4+
*) Feature: path MTU discovery when using HTTP/3.
5+
6+
*) Feature: TLS_AES_128_CCM_SHA256 cipher suite support when using
7+
HTTP/3.
8+
9+
*) Change: now nginx uses appname "nginx" when loading OpenSSL
10+
configuration.
11+
12+
*) Change: now nginx does not try to load OpenSSL configuration if the
13+
--with-openssl option was used to built OpenSSL and the OPENSSL_CONF
14+
environment variable is not set.
15+
16+
*) Bugfix: in the $body_bytes_sent variable when using HTTP/3.
17+
18+
*) Bugfix: in HTTP/3.
19+
20+
221
Changes with nginx 1.25.1 13 Jun 2023
322

423
*) Feature: the "http2" directive, which enables HTTP/2 on a per-server

CHANGES.ru

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11

2+
Изменения в nginx 1.25.2 15.08.2023
3+
4+
*) Добавление: path MTU discovery при использовании HTTP/3.
5+
6+
*) Добавление: поддержка шифра TLS_AES_128_CCM_SHA256 при использовании
7+
HTTP/3.
8+
9+
*) Изменение: теперь при загрузке конфигурации OpenSSL nginx использует
10+
appname "nginx".
11+
12+
*) Изменение: теперь nginx не пытается загружать конфигурацию OpenSSL,
13+
если для сборки OpenSSL использовался параметр --with-openssl и
14+
переменная окружения OPENSSL_CONF не установлена.
15+
16+
*) Исправление: в переменной $body_bytes_sent при использовании HTTP/3.
17+
18+
*) Исправление: в HTTP/3.
19+
20+
221
Изменения в nginx 1.25.1 13.06.2023
322

423
*) Добавление: директива http2, позволяющая включать HTTP/2 в отдельных

app/cpp/readme

Whitespace-only changes.

auto/lib/openssl/conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ if [ $OPENSSL != NONE ]; then
88
have=NGX_OPENSSL . auto/have
99
have=NGX_SSL . auto/have
1010

11+
have=NGX_OPENSSL_NO_CONFIG . auto/have
12+
1113
if [ $USE_OPENSSL_QUIC = YES ]; then
1214
have=NGX_QUIC . auto/have
1315
have=NGX_QUIC_OPENSSL_COMPAT . auto/have

auto/options

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ HTTP_UPSTREAM_ZONE=YES
110110

111111

112112
HTTP_HI_PYTHON_VERSION=python3
113-
HTTP_HI_LUA_VERSION=lua5.3
113+
HTTP_HI_LUA_VERSION=lua5.4
114114

115115
# STUB
116116
HTTP_STUB_STATUS=NO
@@ -613,7 +613,7 @@ cat << END
613613
--with-debug enable debug logging
614614

615615
--with-http-hi-python-version with python version,python2 or python3 ,default:python3
616-
--with-http-hi-lua-versioin with lua version,lua,lua5.1,lua5.2,lua5.3 or luajit ,default:lua5.3
616+
--with-http-hi-lua-versioin with lua version,lua,lua5.1,lua5.2,lua5.3,lua5.4 or luajit ,default:lua5.4
617617

618618
END
619619

contrib/vim/syntax/nginx.vim

Lines changed: 93 additions & 124 deletions
Large diffs are not rendered by default.

install_demo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ if ! test -f Makefile;then
1010
--with-stream_ssl_module \
1111
--with-http_realip_module \
1212
--prefix=/usr/local/nginx \
13-
--with-http-hi-python-version=python-3.8-embed \
14-
--with-http-hi-lua-version=lua5.3 \
13+
--with-http-hi-python-version=python-3.10-embed \
14+
--with-http-hi-lua-version=lua5.4 \
1515
--add-module=module/ngx_http_autoblacklist_module \
1616
--add-module=module/ngx_http_lua_module \
1717
--add-module=module/ngx_http_py_module \

module/lib/kaguya.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6214,9 +6214,11 @@ struct ErrorHandler {
62146214
? std::string(message)
62156215
: "unknown error running error");
62166216
#if LUA_VERSION_NUM >= 502
6217+
#if LUA_VERSION_NUM <= 503
62176218
case LUA_ERRGCMM:
62186219
throw LuaGCError(status,
62196220
message ? std::string(message) : "unknown gc error");
6221+
#endif
62206222
#endif
62216223
default:
62226224
throw LuaUnknownError(status, message ? std::string(message)
@@ -6756,7 +6758,13 @@ template <typename Derived> class LuaThreadImpl {
67566758
if (argnum < 0) {
67576759
argnum = 0;
67586760
}
6759-
int result = lua_resume(thread, state, argnum);
6761+
int nres;
6762+
int result =
6763+
#if LUA_VERSION_NUM <= 503
6764+
lua_resume(thread, state, argnum);
6765+
#else
6766+
lua_resume(thread,state,argnum,&nres);
6767+
#endif
67606768
except::checkErrorAndThrow(result, thread);
67616769
return detail::FunctionResultProxy::ReturnValue(thread, result, 1,
67626770
types::typetag<Result>());

src/core/nginx.c

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
static void ngx_show_version_info(void);
1414
static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle);
1515
static void ngx_cleanup_environment(void *data);
16+
static void ngx_cleanup_environment_variable(void *data);
1617
static ngx_int_t ngx_get_options(int argc, char *const *argv);
1718
static ngx_int_t ngx_process_options(ngx_cycle_t *cycle);
1819
static ngx_int_t ngx_save_argv(ngx_cycle_t *cycle, int argc, char *const *argv);
@@ -518,7 +519,8 @@ ngx_add_inherited_sockets(ngx_cycle_t *cycle)
518519
char **
519520
ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last)
520521
{
521-
char **p, **env;
522+
char **p, **env, *str;
523+
size_t len;
522524
ngx_str_t *var;
523525
ngx_uint_t i, n;
524526
ngx_core_conf_t *ccf;
@@ -600,7 +602,31 @@ ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last)
600602
for (i = 0; i < ccf->env.nelts; i++) {
601603

602604
if (var[i].data[var[i].len] == '=') {
603-
env[n++] = (char *) var[i].data;
605+
606+
if (last) {
607+
env[n++] = (char *) var[i].data;
608+
continue;
609+
}
610+
611+
cln = ngx_pool_cleanup_add(cycle->pool, 0);
612+
if (cln == NULL) {
613+
return NULL;
614+
}
615+
616+
len = ngx_strlen(var[i].data) + 1;
617+
618+
str = ngx_alloc(len, cycle->log);
619+
if (str == NULL) {
620+
return NULL;
621+
}
622+
623+
ngx_memcpy(str, var[i].data, len);
624+
625+
cln->handler = ngx_cleanup_environment_variable;
626+
cln->data = str;
627+
628+
env[n++] = str;
629+
604630
continue;
605631
}
606632

@@ -645,6 +671,29 @@ ngx_cleanup_environment(void *data)
645671
}
646672

647673

674+
static void
675+
ngx_cleanup_environment_variable(void *data)
676+
{
677+
char *var = data;
678+
679+
char **p;
680+
681+
for (p = environ; *p; p++) {
682+
683+
/*
684+
* if an environment variable is still used, as it happens on exit,
685+
* the only option is to leak it
686+
*/
687+
688+
if (*p == var) {
689+
return;
690+
}
691+
}
692+
693+
ngx_free(var);
694+
}
695+
696+
648697
ngx_pid_t
649698
ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv)
650699
{

src/core/nginx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#define _NGINX_H_INCLUDED_
1010

1111

12-
#define nginx_version 1025001
13-
#define NGINX_VERSION "1.25.1"
12+
#define nginx_version 1025002
13+
#define NGINX_VERSION "1.25.2"
1414
#define NGINX_VER "nginx/" NGINX_VERSION
1515

1616
#ifdef NGX_BUILD

0 commit comments

Comments
 (0)