Skip to content

Commit 221a134

Browse files
committed
Keep the response body in memory
This commit fix the issue #8. This patch needs to be polished, it is only necessary if the SecResponseBody is enabled.
1 parent 2220db8 commit 221a134

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ngx_http_modsecurity_header_filter.c

+7
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ ngx_int_t ngx_http_modsecurity_header_filter(ngx_http_request_t *r)
370370
return ngx_http_next_header_filter(r);
371371
}
372372

373+
/**
374+
* Lets ask nginx to keep the response body in memory
375+
*
376+
* FIXME: I don't see a reason to keep it `1' when SecResponseBody is disabled.
377+
*/
378+
r->filter_need_in_memory = 1;
379+
373380
ctx->processed = 1;
374381
/*
375382
*

0 commit comments

Comments
 (0)