mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Allow non-zero Content-Length for HEAD requests
This commit is contained in:
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");
|
||||
|
||||
|
||||
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 = NULL; /* header filter will set this */
|
||||
|
Loading…
x
Reference in New Issue
Block a user