# HG changeset patch # User Igor Sysoev # Date 1169401348 0 # Node ID b54a1e283d6d0626c643bce5f4cc1c15f3d57346 # Parent e6fc18f1a032431e1713fe5abcbd2fc4767a738a allow "sendfile" in "if" context diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -275,7 +275,8 @@ static ngx_command_t ngx_http_core_comm NULL }, { ngx_string("sendfile"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF + |NGX_CONF_TAKE1, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_core_loc_conf_t, sendfile),