openresty / echo-nginx-module

An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file
http://wiki.nginx.org/NginxHttpEchoModule
BSD 2-Clause "Simplified" License
1.17k stars 254 forks source link

config: avoided an error with NGINX 1.17.0 and above. #89

Closed thibaultcha closed 5 years ago

thibaultcha commented 5 years ago

Currently, building those modules with NGINX 1.17.0+ produces the following errors:

/path/to/echo-nginx-module/config: line 41: [: !=: unary operator expected
/path/to/srcache-nginx-module/config: line 30: [: !=: unary operator expected

Since the HTTP_POSTPONE variable is not defined. However, since the postpone filter is unconditionally enabled with NGINX 1.17.0 and above, we can simply skip this logic.

See: https://github.com/nginx/nginx/commit/a39380a41e7d7ceeda2c0526c5df474f158c6a53

Sister PR: https://github.com/openresty/srcache-nginx-module/pull/79