Skip to content

Commit 67394a4

Browse files
authored
bugfix: config: avoided an error with NGINX 1.17.0 and above.
The postpone filter is unconditionally enabled with NGINX 1.17.0 and above. See: nginx/nginx@a39380a
1 parent 516184f commit 67394a4

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

config

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,24 @@ ECHO_DEPS=" \
3030
$ngx_addon_dir/src/ngx_http_echo_foreach.h \
3131
"
3232

33-
# nginx won't have HTTP_POSTPONE_FILTER_MODULE & HTTP_POSTPONE_FILTER_SRCS
34-
# defined since 1.9.11
35-
if test -z "$HTTP_POSTPONE_FILTER_MODULE"; then
36-
HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_module
37-
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c
38-
fi
33+
# nginx 1.17.0+ unconditionally enables the postpone filter
34+
if [ ! -z "$HTTP_POSTPONE" ]; then
35+
# nginx won't have HTTP_POSTPONE_FILTER_MODULE & HTTP_POSTPONE_FILTER_SRCS
36+
# defined since 1.9.11
37+
if [ -z "$HTTP_POSTPONE_FILTER_MODULE" ]; then
38+
HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_module
39+
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c
40+
fi
3941

40-
# This module depends upon the postpone filter being activated
41-
if [ $HTTP_POSTPONE != YES ]; then
42-
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
43-
HTTP_SRCS="$HTTP_SRCS $HTTP_POSTPONE_FILTER_SRCS"
44-
HTTP_POSTPONE=YES
42+
# This module depends upon the postpone filter being activated
43+
if [ $HTTP_POSTPONE != YES ]; then
44+
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
45+
HTTP_SRCS="$HTTP_SRCS $HTTP_POSTPONE_FILTER_SRCS"
46+
HTTP_POSTPONE=YES
47+
fi
4548
fi
4649

47-
if test -n "$ngx_module_link"; then
50+
if [ -n "$ngx_module_link" ]; then
4851
ngx_module_type=HTTP_AUX_FILTER
4952
ngx_module_name=$ngx_addon_name
5053
ngx_module_incs=

0 commit comments

Comments
 (0)