Welcome! Log In Create A New Profile

Advanced

回复:Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

杜叶飞(淮叶) via nginx-devel
December 04, 2022 08:40PM
OK, I I have another question about this. 'NGX_MODULE_SIGNATURE_27' should be with NGX_HTTP_GZIP as the following patch ?
# HG changeset patch
# User BullerDu <yefei.dyf@alibaba-inc.com>
# Date 1670204057 -28800
# Mon Dec 05 09:34:17 2022 +0800
# Branch bugfix_dynamic_module
# Node ID 5e63c3cf514e64a5f6499b66613d4935bd026d5f
# Parent 0b360747c74e3fa7e439e0684a8cf1da2d14d8f6
Modules compatibility: degradation signature must be with NGX_HTTP_GZIP(Introduced by 3b522d7a5b34).
diff -r 0b360747c74e -r 5e63c3cf514e src/core/ngx_module.h
--- a/src/core/ngx_module.h Thu Nov 24 23:08:30 2022 +0400
+++ b/src/core/ngx_module.h Mon Dec 05 09:34:17 2022 +0800
@@ -149,12 +149,12 @@
#if (NGX_HTTP_GZIP)
#define NGX_MODULE_SIGNATURE_26 "1"
+#define NGX_MODULE_SIGNATURE_27 "1"
#else
#define NGX_MODULE_SIGNATURE_26 "0"
+#define NGX_MODULE_SIGNATURE_27 "0"
#endif
-#define NGX_MODULE_SIGNATURE_27 "1"
-
#if (NGX_HTTP_X_FORWARDED_FOR)
#define NGX_MODULE_SIGNATURE_28 "1"
#else
------------------------------------------------------------------
发件人:Maxim Dounin <mdounin@mdounin.ru>
发送时间:2022年12月5日(星期一) 04:13
收件人:nginx-devel <nginx-devel@nginx.org>
主 题:Re: Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).
Hello!
On Sat, Dec 03, 2022 at 11:16:44PM +0800, 杜叶飞(淮叶) via nginx-devel wrote:
> I think gzip_disable_degradation needs NGX_HTTP_DEGRADATION in order to be consistent with where used.
> details: https://hg.nginx.org/nginx/rev/3b522d7a5b34 <https://hg.nginx.org/nginx/rev/3b522d7a5b34 >
The revision you've linked explains why this "#if" is not really
needed even if we are concerned about saving these two bits in the
location configuration structure (and we aren't really concerned
anyway).
Further, the patch you've suggested breaks binary compatibility
between nginx builds with and without the degradation module
without restoring appropriate flag in the binary signature. This
is clearly incorrect behaviour which can result in segmentation
faults or other unexpected behaviour if modules compiled with
different assumptions are loaded into nginx.
--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

杜叶飞(淮叶) via nginx-devel 351 December 03, 2022 10:18AM

Re: Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

Maxim Dounin 91 December 04, 2022 03:10PM

回复:Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

杜叶飞(淮叶) via nginx-devel 94 December 04, 2022 08:10PM

回复:Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

杜叶飞(淮叶) via nginx-devel 81 December 04, 2022 08:40PM

Re: 回复:Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

Maxim Dounin 84 December 05, 2022 08:04PM

回复:回复:Fixed gzip_disable_degradation defined without NGX_HTTP_DEGRADATION (broken by 3b522d7a5b34).

杜叶飞(淮叶) via nginx-devel 112 December 05, 2022 08:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 202
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready