@@ -387,6 +387,7 @@ ngx_http_fastcgi_cache_purge_conf(ngx_conf_t *cf, ngx_command_t *cmd,
387387 clcf = ngx_http_conf_get_module_loc_conf (cf , ngx_http_core_module );
388388
389389 cplcf -> fastcgi .enable = 0 ;
390+ cplcf -> conf = & cplcf -> fastcgi ;
390391 clcf -> handler = ngx_http_fastcgi_cache_purge_handler ;
391392
392393 return NGX_CONF_OK ;
@@ -673,6 +674,7 @@ ngx_http_proxy_cache_purge_conf(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
673674 clcf = ngx_http_conf_get_module_loc_conf (cf , ngx_http_core_module );
674675
675676 cplcf -> proxy .enable = 0 ;
677+ cplcf -> conf = & cplcf -> proxy ;
676678 clcf -> handler = ngx_http_proxy_cache_purge_handler ;
677679
678680 return NGX_CONF_OK ;
@@ -897,6 +899,7 @@ ngx_http_scgi_cache_purge_conf(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
897899 clcf = ngx_http_conf_get_module_loc_conf (cf , ngx_http_core_module );
898900
899901 cplcf -> scgi .enable = 0 ;
902+ cplcf -> conf = & cplcf -> scgi ;
900903 clcf -> handler = ngx_http_scgi_cache_purge_handler ;
901904
902905 return NGX_CONF_OK ;
@@ -1144,6 +1147,7 @@ ngx_http_uwsgi_cache_purge_conf(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
11441147 clcf = ngx_http_conf_get_module_loc_conf (cf , ngx_http_core_module );
11451148
11461149 cplcf -> uwsgi .enable = 0 ;
1150+ cplcf -> conf = & cplcf -> uwsgi ;
11471151 clcf -> handler = ngx_http_uwsgi_cache_purge_handler ;
11481152
11491153 return NGX_CONF_OK ;
@@ -1249,9 +1253,11 @@ ngx_http_purge_file_cache_delete_partial_file(ngx_tree_ctx_t *ctx, ngx_str_t *pa
12491253 } else {
12501254 ngx_file_t file ;
12511255
1256+ ngx_memzero (& file , sizeof (ngx_file_t ));
12521257 file .offset = file .sys_offset = 0 ;
12531258 file .fd = ngx_open_file (path -> data , NGX_FILE_RDONLY , NGX_FILE_OPEN ,
12541259 NGX_FILE_DEFAULT_ACCESS );
1260+ file .log = ctx -> log ;
12551261
12561262 /* I don't know if it's a good idea to use the ngx_cycle pool for this,
12571263 but the request is not available here */
0 commit comments