3rd party modules requiring ngx_http_postpone_filter_module

Anthony Ryan anthonyryan1 at gmail.com
Wed Apr 20 04:33:17 UTC 2016


I'm currently looking for ideas to resolve a 3rd party module
regression[1][2] that I keep running into, and figured it would be
best to consult the experts.

The ngx_http_postpone_filter_module is a critical helper for many
modules to ensure subrequests are properly ordered. But I can't seem
to find a proper way to ensure it's included for a 3rd party module.

All of the internal modules which use it have a special declaration in
the auto/modules file enabling postpone, but among the 3rd party
modules there has only ever been crappy workarounds (documentation
saying to enable the SSI module or another which pulls in postpone) or

With the new build system introduced in 1.9.11 though,
HTTP_POSTPONE_FILTER_SRCS is no longer exposed to the config file 3rd
party modules use, and we've hit a bit of an impasse. We either need
to pile on increasingly desperate hacks, or we need a better way to
express to the build system when a 3rd party module depends on

One possible solution is to patch the build process to have a
"preconfig" file where modules could override the options specified in
auto/options but it would also give 3rd party modules more room to
mess up variables and break nginx in unexpected ways.

Another option could be to modify the build process to check for
inter-module dependencies being satisfied. So that a module could
specify that it depends on ngx_http_postpone_filter_module and after
all modules were configured, if any dependencies were not enabled,
they would then be configured as well.

So I pose the question: How can we ensure 3rd party modules can pull
in postpone in a future proof way? Is there an obvious solution I'm
overlooking? Or how can the build process be modified to address this?

Kind regards,
Anthony Ryan

[1] https://github.com/evanmiller/mod_zip/issues/52
[2] https://github.com/openresty/echo-nginx-module/pull/42

More information about the nginx-devel mailing list