nginx_upstream_check_module icon indicating copy to clipboard operation
nginx_upstream_check_module copied to clipboard

reqstat 模块中ngx_http_top_input_body_filter

Open chensunny opened this issue 6 years ago • 0 comments

reqstat module 中的 ngx_http_reqstat_input_body_filter , 好像整个tengine 项目没有入口能够进入ngx_http_top_input_body_filter这个filter

static ngx_int_t ngx_http_reqstat_init(ngx_conf_t *cf) { ngx_http_handler_pt *h; ngx_http_core_main_conf_t *cmcf;

cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);

h = ngx_array_push(&cmcf->phases[NGX_HTTP_LOG_PHASE].handlers);
if (h == NULL) {
    return NGX_ERROR;
}

*h = ngx_http_reqstat_log_handler;

h = ngx_array_push(&cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers);
if (h == NULL) {
    return NGX_ERROR;
}

*h = ngx_http_reqstat_init_handler;

ngx_http_next_input_body_filter = ngx_http_top_input_body_filter;
ngx_http_top_input_body_filter = ngx_http_reqstat_input_body_filter;

ngx_http_write_filter_stat = ngx_http_reqstat_log_flow;

return NGX_OK;

}

chensunny avatar Mar 02 '18 02:03 chensunny