Skip to content

Commit 0e242c2

Browse files
defanatorFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Restore r->write_event_handler after reading request body
Closes #130.
1 parent 475e1d5 commit 0e242c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ngx_http_modsecurity_pre_access.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ngx_http_modsecurity_request_read(ngx_http_request_t *r)
3434
if (ctx->waiting_more_body)
3535
{
3636
ctx->waiting_more_body = 0;
37+
r->write_event_handler = ngx_http_core_run_phases;
3738
ngx_http_core_run_phases(r);
3839
}
3940
}
@@ -131,6 +132,8 @@ ngx_http_modsecurity_pre_access_handler(ngx_http_request_t *r)
131132

132133
dd("request body is ready to be processed");
133134

135+
r->write_event_handler = ngx_http_core_run_phases;
136+
134137
ngx_chain_t *chain = r->request_body->bufs;
135138

136139
/**

0 commit comments

Comments
 (0)