Make sure all filehandles are closed at the end of a trasaction. See #464 and #465.

Fixes a few typos in some error messages when we are over the limits.
This commit is contained in:
brectanus
2008-03-28 20:00:37 +00:00
parent b74b659114
commit aa6be1614e
4 changed files with 30 additions and 4 deletions

View File

@@ -215,7 +215,7 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
/* Check request body limit (should only trigger on chunked requests). */
if (msr->reqbody_length + buflen > (apr_size_t)msr->txcfg->reqbody_limit) {
*error_msg = apr_psprintf(msr->mp, "Requests body is larger than the "
*error_msg = apr_psprintf(msr->mp, "Request body is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_limit);
return -5;
}
@@ -224,7 +224,7 @@ apr_status_t read_request_body(modsec_rec *msr, char **error_msg) {
int rcbs = modsecurity_request_body_store(msr, buf, buflen, error_msg);
if (rcbs < 0) {
if (rcbs == -5) {
*error_msg = apr_psprintf(msr->mp, "Requests body no files data length is larger than the "
*error_msg = apr_psprintf(msr->mp, "Request body no files data length is larger than the "
"configured limit (%ld).", msr->txcfg->reqbody_no_files_limit);
return -5;
}