mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Print when request is blocked when it is larger than the configuration
This commit is contained in:
parent
6e3bb889c4
commit
0f5b0debea
@ -770,13 +770,17 @@ static int hook_request_late(request_rec *r) {
|
||||
return HTTP_REQUEST_TIME_OUT;
|
||||
break;
|
||||
case -5 : /* Request body limit reached. */
|
||||
if (my_error_msg != NULL) {
|
||||
msr_log(msr, 1, "%s", my_error_msg);
|
||||
}
|
||||
msr->inbound_error = 1;
|
||||
if(msr->txcfg->if_limit_action == RESPONSE_BODY_LIMIT_ACTION_REJECT) {
|
||||
if(msr->txcfg->if_limit_action == REQUEST_BODY_LIMIT_ACTION_REJECT) {
|
||||
r->connection->keepalive = AP_CONN_CLOSE;
|
||||
if (my_error_msg != NULL) {
|
||||
msr_log(msr, 1, "%s. Deny with code (%d)", my_error_msg, HTTP_REQUEST_ENTITY_TOO_LARGE);
|
||||
}
|
||||
return HTTP_REQUEST_ENTITY_TOO_LARGE;
|
||||
} else {
|
||||
if (my_error_msg != NULL) {
|
||||
msr_log(msr, 1, "%s", my_error_msg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case -6 : /* EOF when reading request body. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user