Print when request is blocked when it is larger than the configuration

This commit is contained in:
brenosilva 2011-04-04 19:17:29 +00:00
parent 6e3bb889c4
commit 0f5b0debea

View File

@ -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. */