Navigation Menu

Skip to content

Commit

Permalink
Update nginx version
Browse files Browse the repository at this point in the history
% ./update_nginx.sh 1.15.0
  • Loading branch information
kenhys committed Jun 25, 2018
1 parent 971694f commit 6d9ff52
Show file tree
Hide file tree
Showing 449 changed files with 1,092 additions and 542 deletions.
2 changes: 1 addition & 1 deletion nginx_version
@@ -1 +1 @@
1.14.0
1.15.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,7 +6,8 @@


NGX_CLANG_VER=`$CC -v 2>&1 | grep 'version' 2>&1 \
| sed -e 's/^.* version \(.*\)/\1/'`
| sed -n -e 's/^.*clang version \(.*\)/\1/p' \
-e 's/^.*LLVM version \(.*\)/\1/p'`

echo " + clang version: $NGX_CLANG_VER"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -95,6 +95,7 @@ EVENT_SRCS="src/event/ngx_event.c \
src/event/ngx_event_timer.c \
src/event/ngx_event_posted.c \
src/event/ngx_event_accept.c \
src/event/ngx_event_udp.c \
src/event/ngx_event_connect.c \
src/event/ngx_event_pipe.c"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -5,14 +5,131 @@
<change_log title="nginx">


<changes ver="1.14.0" date="2018-04-17">
<changes ver="1.15.0" date="2018-06-05">

<change>
<change type="change">
<para lang="ru">
Стабильная ветка 1.14.x.
директива "ssl" теперь считается устаревшей;
вместо неё следует использовать параметр ssl директивы listen.
</para>
<para lang="en">
1.14.x stable branch.
the "ssl" directive is deprecated;
the "ssl" parameter of the "listen" directive should be used instead.
</para>
</change>

<change type="change">
<para lang="ru">
теперь при использовании директивы listen с параметром ssl
nginx определяет отсутствие SSL-сертификатов при тестировании конфигурации.
</para>
<para lang="en">
now nginx detects missing SSL certificates during configuration testing
when using the "ssl" parameter of the "listen" directive.
</para>
</change>

<change type="feature">
<para lang="ru">
теперь модуль stream умеет обрабатывать
несколько входящих UDP-пакетов от клиента в рамках одной сессии.
</para>
<para lang="en">
now the stream module can handle
multiple incoming UDP datagrams from a client within a single session.
</para>
</change>

<change type="bugfix">
<para lang="ru">
в директиве proxy_cache_valid
можно было указать некорректный код ответа.
</para>
<para lang="en">
it was possible to specify an incorrect response code
in the "proxy_cache_valid" directive.
</para>
</change>

<change type="bugfix">
<para lang="ru">
nginx не собирался gcc 8.1.
</para>
<para lang="en">
nginx could not be built by gcc 8.1.
</para>
</change>

<change type="bugfix">
<para lang="ru">
логгирование в syslog останавливалось при изменении локального IP-адреса.
</para>
<para lang="en">
logging to syslog stopped on local IP address changes.
</para>
</change>

<change type="bugfix">
<para lang="ru">
nginx не собирался компилятором clang, если был установлен CUDA SDK;
ошибка появилась в 1.13.8.
</para>
<para lang="en">
nginx could not be built by clang with CUDA SDK installed;
the bug had appeared in 1.13.8.
</para>
</change>

<change type="bugfix">
<para lang="ru">
при использовании unix domain listen-сокетов на FreeBSD
в процессе обновления исполняемого файла
в логе могли появляться сообщения "getsockopt(TCP_FASTOPEN) ... failed".
</para>
<para lang="en">
"getsockopt(TCP_FASTOPEN) ... failed" messages might appear in logs
during binary upgrade
when using unix domain listen sockets on FreeBSD.
</para>
</change>

<change type="bugfix">
<para lang="ru">
nginx не собирался на Fedora 28 Linux.
</para>
<para lang="en">
nginx could not be built on Fedora 28 Linux.
</para>
</change>

<change type="bugfix">
<para lang="ru">
при использовании директивы limit_req
заданная скорость обработки запросов могла не соблюдаться.
</para>
<para lang="en">
request processing rate might exceed configured rate
when using the "limit_req" directive.
</para>
</change>

<change type="bugfix">
<para lang="ru">
в обработке адресов клиентов при использовании unix domain listen-сокетов
для работы с датаграммами на Linux.
</para>
<para lang="en">
in handling of client addresses when using unix domain listen sockets
to work with datagrams on Linux.
</para>
</change>

<change type="bugfix">
<para lang="ru">
в обработке ошибок выделения памяти.
</para>
<para lang="en">
in memory allocation error handling.
</para>
</change>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_


#define nginx_version 1014000
#define NGINX_VERSION "1.14.0"
#define nginx_version 1015000
#define NGINX_VERSION "1.15.0"
#define NGINX_VER "nginx/" NGINX_VERSION

#ifdef NGX_BUILD
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -137,6 +137,7 @@ ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in)
while (in) {
cl = ngx_alloc_chain_link(pool);
if (cl == NULL) {
*ll = NULL;
return NGX_ERROR;
}

Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -72,6 +72,10 @@ ngx_create_listening(ngx_conf_t *cf, struct sockaddr *sockaddr,

ngx_memcpy(ls->addr_text.data, text, len);

#if !(NGX_WIN32)
ngx_rbtree_init(&ls->rbtree, &ls->sentinel, ngx_udp_rbtree_insert_value);
#endif

ls->fd = (ngx_socket_t) -1;
ls->type = SOCK_STREAM;

Expand Down Expand Up @@ -305,7 +309,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle)
{
err = ngx_socket_errno;

if (err != NGX_EOPNOTSUPP && err != NGX_ENOPROTOOPT) {
if (err != NGX_EOPNOTSUPP && err != NGX_ENOPROTOOPT
&& err != NGX_EINVAL)
{
ngx_log_error(NGX_LOG_NOTICE, cycle->log, err,
"getsockopt(TCP_FASTOPEN) %V failed, ignored",
&ls[i].addr_text);
Expand Down
Expand Up @@ -51,6 +51,9 @@ struct ngx_listening_s {
ngx_listening_t *previous;
ngx_connection_t *connection;

ngx_rbtree_t rbtree;
ngx_rbtree_node_t sentinel;

ngx_uint_t worker;

unsigned open:1;
Expand Down Expand Up @@ -151,6 +154,8 @@ struct ngx_connection_s {
ngx_ssl_connection_t *ssl;
#endif

ngx_udp_connection_t *udp;

struct sockaddr *local_sockaddr;
socklen_t local_socklen;

Expand Down
Expand Up @@ -27,6 +27,7 @@ typedef struct ngx_connection_s ngx_connection_t;
typedef struct ngx_thread_task_s ngx_thread_task_t;
typedef struct ngx_ssl_s ngx_ssl_t;
typedef struct ngx_ssl_connection_s ngx_ssl_connection_t;
typedef struct ngx_udp_connection_s ngx_udp_connection_t;

typedef void (*ngx_event_handler_pt)(ngx_event_t *ev);
typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -1299,16 +1299,23 @@ ngx_resolver_send_udp_query(ngx_resolver_t *r, ngx_resolver_connection_t *rec,

n = ngx_send(rec->udp, query, qlen);

if (n == -1) {
return NGX_ERROR;
if (n == NGX_ERROR) {
goto failed;
}

if ((size_t) n != (size_t) qlen) {
ngx_log_error(NGX_LOG_CRIT, &rec->log, 0, "send() incomplete");
return NGX_ERROR;
goto failed;
}

return NGX_OK;

failed:

ngx_close_connection(rec->udp);
rec->udp = NULL;

return NGX_ERROR;
}


Expand Down Expand Up @@ -4546,7 +4553,7 @@ ngx_tcp_connect(ngx_resolver_connection_t *rec)
level = NGX_LOG_CRIT;
}

ngx_log_error(level, c->log, err, "connect() to %V failed",
ngx_log_error(level, &rec->log, err, "connect() to %V failed",
&rec->server);

ngx_close_connection(c);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -39,7 +39,8 @@ static ngx_event_t ngx_syslog_dummy_event;
char *
ngx_syslog_process_conf(ngx_conf_t *cf, ngx_syslog_peer_t *peer)
{
peer->pool = cf->pool;
ngx_pool_cleanup_t *cln;

peer->facility = NGX_CONF_UNSET_UINT;
peer->severity = NGX_CONF_UNSET_UINT;

Expand Down Expand Up @@ -67,6 +68,19 @@ ngx_syslog_process_conf(ngx_conf_t *cf, ngx_syslog_peer_t *peer)

peer->conn.fd = (ngx_socket_t) -1;

peer->conn.read = &ngx_syslog_dummy_event;
peer->conn.write = &ngx_syslog_dummy_event;

ngx_syslog_dummy_event.log = &ngx_syslog_dummy_log;

cln = ngx_pool_cleanup_add(cf->pool, 0);
if (cln == NULL) {
return NGX_CONF_ERROR;
}

cln->data = peer;
cln->handler = ngx_syslog_cleanup;

return NGX_CONF_OK;
}

Expand Down Expand Up @@ -289,9 +303,7 @@ ngx_syslog_send(ngx_syslog_peer_t *peer, u_char *buf, size_t len)
n = ngx_os_io.send(&peer->conn, buf, len);
}

#if (NGX_HAVE_UNIX_DOMAIN)

if (n == NGX_ERROR && peer->server.sockaddr->sa_family == AF_UNIX) {
if (n == NGX_ERROR) {

if (ngx_close_socket(peer->conn.fd) == -1) {
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, ngx_socket_errno,
Expand All @@ -301,22 +313,14 @@ ngx_syslog_send(ngx_syslog_peer_t *peer, u_char *buf, size_t len)
peer->conn.fd = (ngx_socket_t) -1;
}

#endif

return n;
}


static ngx_int_t
ngx_syslog_init_peer(ngx_syslog_peer_t *peer)
{
ngx_socket_t fd;
ngx_pool_cleanup_t *cln;

peer->conn.read = &ngx_syslog_dummy_event;
peer->conn.write = &ngx_syslog_dummy_event;

ngx_syslog_dummy_event.log = &ngx_syslog_dummy_log;
ngx_socket_t fd;

fd = ngx_socket(peer->server.sockaddr->sa_family, SOCK_DGRAM, 0);
if (fd == (ngx_socket_t) -1) {
Expand All @@ -337,14 +341,6 @@ ngx_syslog_init_peer(ngx_syslog_peer_t *peer)
goto failed;
}

cln = ngx_pool_cleanup_add(peer->pool, 0);
if (cln == NULL) {
goto failed;
}

cln->data = peer;
cln->handler = ngx_syslog_cleanup;

peer->conn.fd = fd;

/* UDP sockets are always ready to write */
Expand Down
Expand Up @@ -9,7 +9,6 @@


typedef struct {
ngx_pool_t *pool;
ngx_uint_t facility;
ngx_uint_t severity;
ngx_str_t tag;
Expand Down
File renamed without changes.
Expand Up @@ -43,8 +43,8 @@ extern volatile ngx_str_t ngx_cached_http_log_iso8601;
extern volatile ngx_str_t ngx_cached_syslog_time;

/*
* milliseconds elapsed since epoch and truncated to ngx_msec_t,
* used in event timers
* milliseconds elapsed since some unspecified point in the past
* and truncated to ngx_msec_t, used in event timers
*/
extern volatile ngx_msec_t ngx_current_msec;

Expand Down
File renamed without changes.
Expand Up @@ -506,9 +506,15 @@ extern ngx_module_t ngx_event_core_module;
void ngx_event_accept(ngx_event_t *ev);
#if !(NGX_WIN32)
void ngx_event_recvmsg(ngx_event_t *ev);
void ngx_udp_rbtree_insert_value(ngx_rbtree_node_t *temp,
ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel);
#endif
ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle);
ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle);
u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
#if (NGX_DEBUG)
void ngx_debug_accepted_connection(ngx_event_conf_t *ecf, ngx_connection_t *c);
#endif


void ngx_process_events_and_timers(ngx_cycle_t *cycle);
Expand Down

0 comments on commit 6d9ff52

Please sign in to comment.