From: Jim Jagielski Date: Fri, 27 Apr 2012 13:06:38 +0000 (+0000) Subject: Merge r1299783 from trunk: X-Git-Tag: 2.4.3~525 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c3c4b0e4da45befa99ce266ed74fcb7dbafa22a;p=apache Merge r1299783 from trunk: some more trace logging for AddOutputFilterByType Submitted by: sf Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1331412 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index b2bbd25655..571ed0ed34 100644 --- a/STATUS +++ b/STATUS @@ -109,11 +109,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4 patch: Trunk patch works +1: sf, jorton, jim - * mod_filter: Add some trace logging for AddOutputFilterByType - Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1299783 - 2.4 patch: Trunk patch works - +1: sf, jorton, jim - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c index 7dd7db1abb..67cfd6bbc3 100644 --- a/modules/filters/mod_filter.c +++ b/modules/filters/mod_filter.c @@ -165,13 +165,21 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter) const char **type = provider->types; size_t len = strcspn(r->content_type, "; \t"); AP_DEBUG_ASSERT(type != NULL); + ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, + "Content-Type '%s' ...", r->content_type); while (*type) { /* Handle 'content-type;charset=...' correctly */ if (strncmp(*type, r->content_type, len) == 0 && (*type)[len] == '\0') { + ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, + "... matched '%s'", *type); match = 1; break; } + else { + ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, + "... did not match '%s'", *type); + } type++; } ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, @@ -179,6 +187,11 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter) provider->frec->name, match ? "matched" : "did not match"); } + else { + ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, + "Content-Type condition for '%s' did not match: " + "no Content-Type", provider->frec->name); + } if (match) { /* condition matches this provider */