Skip to content

Commit f158163

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 499a870 commit f158163

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

config

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,21 @@ HTTP_SRCACHE_FILTER_DEPS=" \
1919
$ngx_addon_dir/src/ngx_http_srcache_headers.h \
2020
"
2121

22-
# nginx won't have HTTP_POSTPONE_FILTER_MODULE & HTTP_POSTPONE_FILTER_SRCS
23-
# defined since 1.9.11
24-
if test -z "$HTTP_POSTPONE_FILTER_MODULE"; then
25-
HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_module
26-
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c
27-
fi
22+
# nginx 1.17.0+ unconditionally enables the postpone filter
23+
if [ ! -z "$HTTP_POSTPONE" ]; then
24+
# nginx won't have HTTP_POSTPONE_FILTER_MODULE & HTTP_POSTPONE_FILTER_SRCS
25+
# defined since 1.9.11
26+
if [ -z "$HTTP_POSTPONE_FILTER_MODULE" ]; then
27+
HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_module
28+
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c
29+
fi
2830

29-
# This module depends upon the postpone filter being activated
30-
if [ $HTTP_POSTPONE != YES ]; then
31-
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
32-
HTTP_SRCS="$HTTP_SRCS $HTTP_POSTPONE_FILTER_SRCS"
33-
HTTP_POSTPONE=YES
31+
# This module depends upon the postpone filter being activated
32+
if [ $HTTP_POSTPONE != YES ]; then
33+
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
34+
HTTP_SRCS="$HTTP_SRCS $HTTP_POSTPONE_FILTER_SRCS"
35+
HTTP_POSTPONE=YES
36+
fi
3437
fi
3538

3639
if [ -n "$ngx_module_link" ]; then

0 commit comments

Comments
 (0)