You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2012/04/27 15:06:39 UTC

svn commit: r1331412 - in /httpd/httpd/branches/2.4.x: STATUS modules/filters/mod_filter.c

Author: jim
Date: Fri Apr 27 13:06:38 2012
New Revision: 1331412

URL: http://svn.apache.org/viewvc?rev=1331412&view=rev
Log:
Merge r1299783 from trunk:

some more trace logging for AddOutputFilterByType

Submitted by: sf
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/filters/mod_filter.c

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1331412&r1=1331411&r2=1331412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Fri Apr 27 13:06:38 2012
@@ -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 ]
 

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_filter.c?rev=1331412&r1=1331411&r2=1331412&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_filter.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_filter.c Fri Apr 27 13:06:38 2012
@@ -165,13 +165,21 @@ static int filter_lookup(ap_filter_t *f,
             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,
                           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 */