Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1638A990A for ; Sun, 23 Oct 2011 22:20:06 +0000 (UTC) Received: (qmail 11866 invoked by uid 500); 23 Oct 2011 22:20:05 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 11803 invoked by uid 500); 23 Oct 2011 22:20:05 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 11796 invoked by uid 99); 23 Oct 2011 22:20:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Oct 2011 22:20:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Oct 2011 22:20:03 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C079B238888F; Sun, 23 Oct 2011 22:19:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1187992 - /httpd/httpd/trunk/modules/filters/mod_filter.c Date: Sun, 23 Oct 2011 22:19:42 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111023221942.C079B238888F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sf Date: Sun Oct 23 22:19:42 2011 New Revision: 1187992 URL: http://svn.apache.org/viewvc?rev=1187992&view=rev Log: Unbreak AddOutputFilterByType for content types of the form text/html;charset=..., broken by r1171268. Add some trace logging Modified: httpd/httpd/trunk/modules/filters/mod_filter.c Modified: httpd/httpd/trunk/modules/filters/mod_filter.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_filter.c?rev=1187992&r1=1187991&r2=1187992&view=diff ============================================================================== --- httpd/httpd/trunk/modules/filters/mod_filter.c (original) +++ httpd/httpd/trunk/modules/filters/mod_filter.c Sun Oct 23 22:19:42 2011 @@ -155,17 +155,28 @@ static int filter_lookup(ap_filter_t *f, 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) {