Hello!
On Tue, Sep 18, 2018 at 08:12:20AM -0400, Thomas Ward wrote:
> Downstream in Ubuntu, it has been proposed to demote pcre3 and
> use pcre2 instead as it is newer.
> https://trac.nginx.org/nginx/ticket/720 shows it was marked 4
> years ago that NGINX does not support pcre2. Are there any
> plans to use pcre2 instead of pcre3?
There are no immediate plans.
When we last checked, there were no problems with PCRE, but PCRE2
wasn't available in most distributions we support, making the
switch mostly meaningless.
Also, it looks like PCRE2 is still not supported even by Exim,
which is the parent project of PCRE and PCRE2:
https://bugs.exim.org/show_bug.cgi?id=1878
As such, adding PCRE2 support to nginx looks premature.
--
Maxim Dounin
http://mdounin.ru/
Hi,
I hope someone can help illuminate some background information related to this module. I understand that the rtmp_auto_push directive worked with multiple workers through nginx 1.7.x and then something changed in the nginx internals and it stopped working and was no longer supported for multiple workers.
Can someone provide background on what changed that had this feature stop working? My manager has tasked me with getting this feature to work, if possible.
Thanks,
Carey Gister
415-310-5304
details: https://hg.nginx.org/nginx/rev/0ef2bc0ec9c9
branches:
changeset: 7545:0ef2bc0ec9c9
user: Maxim Dounin <mdounin(a)mdounin.ru>
date: Wed Jul 31 17:29:00 2019 +0300
description:
Gzip: fixed "zero size buf" alerts after ac5a741d39cf.
After ac5a741d39cf it is now possible that after zstream.avail_out
reaches 0 and we allocate additional buffer, there will be no more data
to put into this buffer, triggering "zero size buf" alert. Fix is to
reset b->temporary flag in this case.
Additionally, an optimization added to avoid allocating additional buffer
in this case, by checking if last deflate() call returned Z_STREAM_END.
Note that checking for Z_STREAM_END by itself is not enough to fix alerts,
as deflate() can return Z_STREAM_END without producing any output if the
buffer is smaller than gzip trailer.
Reported by Witold Filipczyk,
http://mailman.nginx.org/pipermail/nginx-devel/2019-July/012469.html.
diffstat:
src/http/modules/ngx_http_gzip_filter_module.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (43 lines):
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -778,7 +778,7 @@ ngx_http_gzip_filter_deflate(ngx_http_re
ctx->out_buf->last = ctx->zstream.next_out;
- if (ctx->zstream.avail_out == 0) {
+ if (ctx->zstream.avail_out == 0 && rc != Z_STREAM_END) {
/* zlib wants to output some more gzipped data */
@@ -868,6 +868,7 @@ ngx_http_gzip_filter_deflate_end(ngx_htt
ngx_http_gzip_ctx_t *ctx)
{
int rc;
+ ngx_buf_t *b;
ngx_chain_t *cl;
ctx->zin = ctx->zstream.total_in;
@@ -888,13 +889,19 @@ ngx_http_gzip_filter_deflate_end(ngx_htt
return NGX_ERROR;
}
- cl->buf = ctx->out_buf;
+ b = ctx->out_buf;
+
+ if (ngx_buf_size(b) == 0) {
+ b->temporary = 0;
+ }
+
+ b->last_buf = 1;
+
+ cl->buf = b;
cl->next = NULL;
*ctx->last_out = cl;
ctx->last_out = &cl->next;
- ctx->out_buf->last_buf = 1;
-
ctx->zstream.avail_in = 0;
ctx->zstream.avail_out = 0;