mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Merge pull request #67 from chaizhenhua/remotes/trunk
Nginx Improved response body filter, issue #56 might be fixed
This commit is contained in:
commit
1919c3a442
@ -1162,15 +1162,21 @@ ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "modSecurity: body filter");
|
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "modSecurity: body filter");
|
||||||
|
|
||||||
if (in == NULL) {
|
if (in == NULL) {
|
||||||
|
/* waiting for more buffer */
|
||||||
|
r->buffered |= NGX_HTTP_SSI_BUFFERED;
|
||||||
return NGX_AGAIN;
|
return NGX_AGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = move_chain_to_brigade(in, ctx->brigade, r->pool, 0);
|
rc = move_chain_to_brigade(in, ctx->brigade, r->pool, 0);
|
||||||
if (rc != NGX_OK) {
|
if (rc != NGX_OK) {
|
||||||
|
/* waiting for more buffer */
|
||||||
|
r->buffered |= NGX_HTTP_SSI_BUFFERED;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* last buf has been saved */
|
/* last buf has been saved */
|
||||||
|
r->buffered &= ~NGX_HTTP_SSI_BUFFERED;
|
||||||
|
|
||||||
ctx->complete = 1;
|
ctx->complete = 1;
|
||||||
modsecSetResponseBrigade(ctx->req, ctx->brigade);
|
modsecSetResponseBrigade(ctx->req, ctx->brigade);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user