mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 18:05:28 +03:00
Allow non-zero Content-Length for HEAD requests
This commit is contained in:
committed by
Felipe Zimmerle
parent
c226240df9
commit
005b42548a
@@ -1412,7 +1412,7 @@ ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
"ModSecurity: save headers out done: done");
|
"ModSecurity: save headers out done: done");
|
||||||
|
|
||||||
|
|
||||||
if (r->headers_out.content_length_n != -1) {
|
if (r->headers_out.content_length_n != -1 && r->method != NGX_HTTP_HEAD) {
|
||||||
|
|
||||||
r->headers_out.content_length_n = content_length;
|
r->headers_out.content_length_n = content_length;
|
||||||
r->headers_out.content_length = NULL; /* header filter will set this */
|
r->headers_out.content_length = NULL; /* header filter will set this */
|
||||||
|
|||||||
Reference in New Issue
Block a user