openresty / srcache-nginx-module

Transparent subrequest-based caching layout for arbitrary nginx locations.
http://wiki.nginx.org/NginxHttpSRCacheModule
476 stars 105 forks source link

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

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/echo-nginx-module/pull/89