Skip to content

Commit

Permalink
The size of cmcf->phase_engine.handlers explained.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdocguard committed Dec 13, 2016
1 parent 2fbe04c commit 7d34042
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/http/ngx_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,10 @@ ngx_http_init_phase_handlers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf)
use_rewrite = cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers.nelts ? 1 : 0;
use_access = cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers.nelts ? 1 : 0;

n = use_rewrite + use_access + cmcf->try_files + 1 /* find config phase */;
n = 1 /* find config phase */
+ use_rewrite /* post rewrite phase */
+ use_access /* post access phase */
+ cmcf->try_files;

for (i = 0; i < NGX_HTTP_LOG_PHASE; i++) {
n += cmcf->phases[i].handlers.nelts;
Expand Down

0 comments on commit 7d34042

Please sign in to comment.