@@ -109,7 +109,7 @@ ngx_http_modsecurity_store_ctx_header(ngx_http_request_t *r, ngx_str_t *name, ng
109
109
ngx_http_modsecurity_conf_t * mcf ;
110
110
ngx_http_modsecurity_header_t * hdr ;
111
111
112
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
112
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
113
113
if (ctx == NULL || ctx -> sanity_headers_out == NULL ) {
114
114
return NGX_ERROR ;
115
115
}
@@ -152,7 +152,7 @@ ngx_http_modsecurity_resolv_header_server(ngx_http_request_t *r, ngx_str_t name,
152
152
ngx_str_t value ;
153
153
154
154
clcf = ngx_http_get_module_loc_conf (r , ngx_http_core_module );
155
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
155
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
156
156
157
157
if (r -> headers_out .server == NULL ) {
158
158
if (clcf -> server_tokens ) {
@@ -186,7 +186,7 @@ ngx_http_modsecurity_resolv_header_date(ngx_http_request_t *r, ngx_str_t name, o
186
186
ngx_http_modsecurity_ctx_t * ctx = NULL ;
187
187
ngx_str_t date ;
188
188
189
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
189
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
190
190
191
191
if (r -> headers_out .date == NULL ) {
192
192
date .data = ngx_cached_http_time .data ;
@@ -216,7 +216,7 @@ ngx_http_modsecurity_resolv_header_content_length(ngx_http_request_t *r, ngx_str
216
216
ngx_str_t value ;
217
217
char buf [NGX_INT64_LEN + 2 ];
218
218
219
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
219
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
220
220
221
221
if (r -> headers_out .content_length_n > 0 )
222
222
{
@@ -243,7 +243,7 @@ ngx_http_modsecurity_resolv_header_content_type(ngx_http_request_t *r, ngx_str_t
243
243
{
244
244
ngx_http_modsecurity_ctx_t * ctx = NULL ;
245
245
246
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
246
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
247
247
248
248
if (r -> headers_out .content_type .len > 0 )
249
249
{
@@ -270,7 +270,7 @@ ngx_http_modsecurity_resolv_header_last_modified(ngx_http_request_t *r, ngx_str_
270
270
u_char buf [1024 ], * p ;
271
271
ngx_str_t value ;
272
272
273
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
273
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
274
274
275
275
if (r -> headers_out .last_modified_time == -1 ) {
276
276
return 1 ;
@@ -302,7 +302,7 @@ ngx_http_modsecurity_resolv_header_connection(ngx_http_request_t *r, ngx_str_t n
302
302
ngx_str_t value ;
303
303
304
304
clcf = ngx_http_get_module_loc_conf (r , ngx_http_core_module );
305
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
305
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
306
306
307
307
if (r -> headers_out .status == NGX_HTTP_SWITCHING_PROTOCOLS ) {
308
308
connection = "upgrade" ;
@@ -353,7 +353,7 @@ ngx_http_modsecurity_resolv_header_transfer_encoding(ngx_http_request_t *r, ngx_
353
353
if (r -> chunked ) {
354
354
ngx_str_t value = ngx_string ("chunked" );
355
355
356
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
356
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
357
357
358
358
#if defined(MODSECURITY_SANITY_CHECKS ) && (MODSECURITY_SANITY_CHECKS )
359
359
ngx_http_modsecurity_store_ctx_header (r , & name , & value );
@@ -380,7 +380,7 @@ ngx_http_modsecurity_resolv_header_vary(ngx_http_request_t *r, ngx_str_t name, o
380
380
if (r -> gzip_vary && clcf -> gzip_vary ) {
381
381
ngx_str_t value = ngx_string ("Accept-Encoding" );
382
382
383
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
383
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
384
384
385
385
#if defined(MODSECURITY_SANITY_CHECKS ) && (MODSECURITY_SANITY_CHECKS )
386
386
ngx_http_modsecurity_store_ctx_header (r , & name , & value );
@@ -422,7 +422,7 @@ ngx_http_modsecurity_header_filter(ngx_http_request_t *r)
422
422
423
423
/* XXX: if NOT_MODIFIED, do we need to process it at all? see xslt_header_filter() */
424
424
425
- ctx = ngx_http_get_module_ctx ( r , ngx_http_modsecurity_module );
425
+ ctx = ngx_http_modsecurity_get_module_ctx ( r );
426
426
427
427
dd ("header filter, recovering ctx: %p" , ctx );
428
428
0 commit comments