Fixed hang up when post multiple request

This commit is contained in:
chaizhenhua 2013-01-09 11:08:08 +08:00
parent 22b8293fdf
commit 0566d652c7

View File

@ -343,7 +343,7 @@ modsecurity_write_body_cb(request_rec *rec, char *buf, unsigned int length)
/* set request body */
b = r->header_in;
if (b->end - b->pos < length) {
if (b->end < b->pos + length) {
b->start = ngx_palloc(ctx->r->pool, length);
if (b->start == NULL) {
return APR_EINVAL;
@ -641,6 +641,7 @@ ngx_http_modsecurity_request_body_handler(ngx_http_request_t *r)
r->phase_handler++;
ngx_http_core_run_phases(r);
ngx_http_finalize_request(r, NGX_DONE);
}