Commit 3d73903d authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Unbreak AddOutputFilterByType for content types of the form

  text/html;charset=...,

broken by r1171268. Add some trace logging


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1187992 13f79535-47bb-0310-9956-ffa450edef68
parent 9e3e2750
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -155,17 +155,28 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
                              err);
                match = 0;
            }
            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
                          "Expression condition for '%s' %s",
                          provider->frec->name,
                          match ? "matched" : "did not match");
        }
        else if (r->content_type) {
            const char **type = provider->types;
            AP_DEBUG_ASSERT(type != NULL);
            while (*type) {
                if (strcmp(*type, r->content_type) == 0) {
                /* Handle 'content-type;charset=...' correctly */
                size_t len = strcspn(r->content_type, "; \t");
                if (strlen(*type) == len
                    && strncmp(*type, r->content_type, len) == 0) {
                    match = 1;
                    break;
                }
                type++;
            }
            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
                          "Content-Type condition for '%s' %s",
                          provider->frec->name,
                          match ? "matched" : "did not match");
        }

        if (match) {