Skip to content

Commit b6f0ebd

Browse files
defanatorFelipe Zimmerle
authored and
Felipe Zimmerle
committed
Restore r->write_event_handler after reading request body
Closes owasp-modsecurity#130.
1 parent 58b1453 commit b6f0ebd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/ngx_http_modsecurity_pre_access.c

+3
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)