From a73da836e221b817247d89206ea994ee05d7e8ac Mon Sep 17 00:00:00 2001 From: b1v1r Date: Wed, 4 Nov 2009 00:12:33 +0000 Subject: [PATCH] Do not log output filter errors to the error log (MODSEC-70). --- CHANGES | 4 +++- apache2/apache2_io.c | 14 ++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 8a5b6d8d..6fe50264 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -02 Nov 2009 - 2.5.11 +03 Nov 2009 - 2.5.11 -------------------- + * Do not log output filter errors in the error log. + * Moved output filter to run before other stock filters (mod_deflate, mod_cache, mod_expires, mod_filter) to avoid analyzing modified data in the response. Patch originally submitted by Ivan Ristic. diff --git a/apache2/apache2_io.c b/apache2/apache2_io.c index ac072a89..1bed6e56 100644 --- a/apache2/apache2_io.c +++ b/apache2/apache2_io.c @@ -407,16 +407,10 @@ static apr_status_t send_of_brigade(modsec_rec *msr, ap_filter_t *f) { rc = ap_pass_brigade(f->next, msr->of_brigade); if (rc != APR_SUCCESS) { - int log_level = 1; - - if (APR_STATUS_IS_ECONNRESET(rc)) { - /* Message "Connection reset by peer" is common and not a sign - * of something unusual. Hence we don't want to make a big deal - * about it, logging at NOTICE level. Everything else we log - * at ERROR level. - */ - log_level = 3; - } + /* TODO: These need to move to flags in 2.6. For now log them + * at level 4 so that they are not confusing users. + */ + int log_level = 4; if (msr->txcfg->debuglog_level >= log_level) { switch(rc) {