Skip to content

Commit

Permalink
update nginx to v1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pangpang@hi-nginx.com committed Nov 5, 2021
1 parent 4c50c46 commit 2ca4f2e
Show file tree
Hide file tree
Showing 35 changed files with 824 additions and 151 deletions.
37 changes: 37 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@

Changes with nginx 1.21.4 02 Nov 2021

*) Change: support for NPN instead of ALPN to establish HTTP/2
connections has been removed.

*) Change: now nginx rejects SSL connections if ALPN is used by the
client, but no supported protocols can be negotiated.

*) Change: the default value of the "sendfile_max_chunk" directive was
changed to 2 megabytes.

*) Feature: the "proxy_half_close" directive in the stream module.

*) Feature: the "ssl_alpn" directive in the stream module.

*) Feature: the $ssl_alpn_protocol variable.

*) Feature: support for SSL_sendfile() when using OpenSSL 3.0.

*) Feature: the "mp4_start_key_frame" directive in the
ngx_http_mp4_module.
Thanks to Tracey Jaquith.

*) Bugfix: in the $content_length variable when using chunked transfer
encoding.

*) Bugfix: after receiving a response with incorrect length from a
proxied backend nginx might nevertheless cache the connection.
Thanks to Awdhesh Mathpal.

*) Bugfix: invalid headers from backends were logged at the "info" level
instead of "error"; the bug had appeared in 1.21.1.

*) Bugfix: requests might hang when using HTTP/2 and the "aio_write"
directive.


Changes with nginx 1.21.3 07 Sep 2021

*) Change: optimization of client request body reading when using
Expand Down
38 changes: 38 additions & 0 deletions CHANGES.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@

Изменения в nginx 1.21.4 02.11.2021

*) Изменение: поддержка NPN вместо ALPN для установления
HTTP/2-соединений упразднена.

*) Изменение: теперь nginx закрывает SSL соединение, если клиент
использует ALPN, но nginx не поддерживает ни один из присланных
клиентом протоколов.

*) Изменение: в директиве sendfile_max_chunk значение по умолчанию
изменено на 2 мегабайта.

*) Добавление: директива proxy_half_close в модуле stream.

*) Добавление: директива ssl_alpn в модуле stream.

*) Добавление: переменная $ssl_alpn_protocol.

*) Добавление: поддержка SSL_sendfile() при использовании OpenSSL 3.0.

*) Добавление: директива mp4_start_key_frame в модуле
ngx_http_mp4_module.
Спасибо Tracey Jaquith.

*) Исправление: в переменной $content_length при использовании chunked
transfer encoding.

*) Исправление: при получении ответа некорректной длины от проксируемого
бэкенда nginx мог тем не менее закэшировать соединение.
Спасибо Awdhesh Mathpal.

*) Исправление: некорректные заголовки от бэкендов логгировались на
уровне info вместо error; ошибка появилась в 1.21.1.

*) Исправление: при использовании HTTP/2 и директивы aio_write запросы
могли зависать.


Изменения в nginx 1.21.3 07.09.2021

*) Изменение: оптимизация чтения тела запроса при использовании HTTP/2.
Expand Down
1 change: 1 addition & 0 deletions conf/mime.types
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ types {
text/vnd.wap.wml wml;
text/x-component htc;

image/avif avif;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
Expand Down
4 changes: 2 additions & 2 deletions src/core/nginx.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_


#define nginx_version 1021003
#define NGINX_VERSION "1.21.3"
#define nginx_version 1021004
#define NGINX_VERSION "1.21.4"
#define NGINX_VER "nginx/" NGINX_VERSION

#ifdef NGX_BUILD
Expand Down
8 changes: 4 additions & 4 deletions src/core/ngx_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,16 @@ ngx_chain_update_chains(ngx_pool_t *p, ngx_chain_t **free, ngx_chain_t **busy,
while (*busy) {
cl = *busy;

if (ngx_buf_size(cl->buf) != 0) {
break;
}

if (cl->buf->tag != tag) {
*busy = cl->next;
ngx_free_chain(p, cl);
continue;
}

if (ngx_buf_size(cl->buf) != 0) {
break;
}

cl->buf->pos = cl->buf->start;
cl->buf->last = cl->buf->start;

Expand Down
4 changes: 4 additions & 0 deletions src/core/ngx_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts)
}

for (n = 0; n < nelts; n++) {
if (names[n].key.data == NULL) {
continue;
}

if (hinit->bucket_size < NGX_HASH_ELT_SIZE(&names[n]) + sizeof(void *))
{
ngx_log_error(NGX_LOG_EMERG, hinit->pool->log, 0,
Expand Down
4 changes: 4 additions & 0 deletions src/core/ngx_output_chain.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,10 @@ ngx_chain_writer(void *data, ngx_chain_t *in)
return NGX_ERROR;
}

if (chain && c->write->ready) {
ngx_post_event(c->write, &ngx_posted_next_events);
}

for (cl = ctx->out; cl && cl != chain; /* void */) {
ln = cl;
cl = cl->next;
Expand Down
4 changes: 0 additions & 4 deletions src/core/ngx_times.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ ngx_monotonic_time(time_t sec, ngx_uint_t msec)

#if defined(CLOCK_MONOTONIC_FAST)
clock_gettime(CLOCK_MONOTONIC_FAST, &ts);

#elif defined(CLOCK_MONOTONIC_COARSE)
clock_gettime(CLOCK_MONOTONIC_COARSE, &ts);

#else
clock_gettime(CLOCK_MONOTONIC, &ts);
#endif
Expand Down
Loading

0 comments on commit 2ca4f2e

Please sign in to comment.