]> granicus.if.org Git - apache/commitdiff
some more trace logging for AddOutputFilterByType
authorStefan Fritsch <sf@apache.org>
Mon, 12 Mar 2012 18:51:52 +0000 (18:51 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 12 Mar 2012 18:51:52 +0000 (18:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1299783 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_filter.c

index 7dd7db1abb7eee71205788c2128b6af714d9a410..67cfd6bbc332f4fd687b90ed48b3e736f9f1da40 100644 (file)
@@ -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 */