Hi,
There is a problem with ngx_http_slice_module when it is used together
with an internal redirection to a named location. It results in Nginx
workers caching incorrect content and spinning in an infinite loop.
Consider the following fragment:
location /foo {
error_page 550 = @bar;
return 550;
}
location @bar {
slice ...;
proxy_pass ...;
proxy_cache ...;
...
}
In ngx_http_slice_body_filter(), the slice context is associated with
the subrequest:
ngx_http_set_ctx(sr, ctx, ngx_http_slice_filter_module);
However, the location re-match is triggered for the subrequests trying
to fetch each slice. In the ngx_http_named_location() function:
/* clear the modules contexts */
ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
So, the slice context gets lost. There are several ways to fix this.
Unless you want an API to preserve the context, one simple fix would be
to get the context via r->parent (if ctx == NULL && r != r->main).
What would be the preferred way to fix this?
Thanks.
--
Mindaugas
Hi,
This patch adds a build option to the server_tokens directive. When build is specified the Server header will have a value of NGINX_VER_BUILD. Also the tail of built in error pages will be NGINX_VER_BUILD. off and on are retained as valid values and behave as they always have.
This makes it possible to specify semi-custom server tokens of the form "nginx/<version> (<value>)". <value> is specified with the --build flag for ./configure.
A potential use case is including the name of a custom build for example with --build="super-nginx/0.1". This would give: nginx/1.9.15 (super-nginx/0.1).
Another potential use case of this feature is to include the git revision of a parent build with --build="`git rev-parse --short HEAD`". This would give: nginx/1.9.15 (c3ebabd). In that case the feature can be used to enhance troubleshooting and/or provide more information to end users.
Kind Regards,
Tom Thorogood.
details: http://hg.nginx.org/nginx/rev/369b74459cf2
branches: stable-1.10
changeset: 6897:369b74459cf2
user: Maxim Dounin <mdounin(a)mdounin.ru>
date: Tue Jan 31 18:01:10 2017 +0300
description:
nginx-1.10.3-RELEASE
diffstat:
docs/xml/nginx/changes.xml | 95 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 95 insertions(+), 0 deletions(-)
diffs (105 lines):
diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml
--- a/docs/xml/nginx/changes.xml
+++ b/docs/xml/nginx/changes.xml
@@ -5,6 +5,101 @@
<change_log title="nginx">
+<changes ver="1.10.3" date="31.01.2017">
+
+<change type="bugfix">
+<para lang="ru">
+в директиве add_after_body при использовании совместно с директивой sub_filter.
+</para>
+<para lang="en">
+in the "add_after_body" directive when used with the "sub_filter" directive.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+unix domain listen-сокеты могли не наследоваться
+при обновлении исполняемого файла на Linux.
+</para>
+<para lang="en">
+unix domain listen sockets might not be inherited
+during binary upgrade on Linux.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+плавное завершение старых рабочих процессов могло занимать бесконечное время
+при использовании HTTP/2.
+</para>
+<para lang="en">
+graceful shutdown of old worker processes might require infinite time
+when using HTTP/2.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании HTTP/2 и директив limit_req или auth_request
+тело запроса могло быть повреждено;
+ошибка появилась в 1.10.2.
+</para>
+<para lang="en">
+when using HTTP/2 and the "limit_req" or "auth_request" directives
+client request body might be corrupted;
+the bug had appeared in 1.10.2.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании HTTP/2 в рабочем процессе мог произойти segmentation fault;
+ошибка появилась в 1.10.2.
+</para>
+<para lang="en">
+a segmentation fault might occur in a worker process when using HTTP/2;
+the bug had appeared in 1.10.2.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании директивы sendfile на FreeBSD и macOS
+мог возвращаться некорректный ответ;
+ошибка появилась в 1.7.8.
+</para>
+<para lang="en">
+an incorrect response might be returned
+when using the "sendfile" directive on FreeBSD and macOS;
+the bug had appeared in 1.7.8.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании директивы aio_write
+ответ мог сохраняться в кэш не полностью.
+</para>
+<para lang="en">
+a truncated response might be stored in cache
+when using the "aio_write" directive.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+при использовании директивы aio_write
+могла происходить утечка сокетов.
+</para>
+<para lang="en">
+a socket leak might occur
+when using the "aio_write" directive.
+</para>
+</change>
+
+</changes>
+
+
<changes ver="1.10.2" date="18.10.2016">
<change type="change">