From: Eric Covener Date: Wed, 18 Nov 2009 16:18:06 +0000 (+0000) Subject: Backport r829657 from trunk: X-Git-Tag: 2.2.15~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28b0cee7be3684b6b0f06d7d01a38a12572bb4c9;p=thirdparty%2Fapache%2Fhttpd.git Backport r829657 from trunk: mod_charsert_lite: Start honoring the 'NoImplicitAdd' CharsetOption. Unsettable since 2.2.9, before that a no-op. Reviewed By: covener, trawick, poirier git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@881824 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 969df4a42c8..e34a4070295 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Changes with Apache 2.2.15 control is still vulnerable, unless using OpenSSL >= 0.9.8l. [Joe Orton, Ruediger Pluem] + *) mod_charset_lite: Honor 'CharsetOptions NoImplicitAdd'. + [Eric Covener] + *) mod_rewrite: Make sure that a hostname:port isn't fully qualified if the request is a CONNECT request. PR 47928 [Bill Zajac ] diff --git a/STATUS b/STATUS index 91d362b3471..524e449e145 100644 --- a/STATUS +++ b/STATUS @@ -87,17 +87,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_charset_lite: Start honoring the 'NoImplicitAdd' CharsetOption, and document - behavior correctly. - - Trunk Patch: http://svn.apache.org/viewvc?rev=829657&view=rev - http://svn.apache.org/viewvc?rev=829664&view=rev - http://svn.apache.org/viewvc?rev=829667&view=rev - - 2.2.x Patch: http://people.apache.org/~covener/2.2.x-xlate_lite-noimplicitadd.diff (no code conflicts) - +1: covener, trawick (without unrelated generated html), poirier - (without unrelated generated html) - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c index 2d54ff6fd8b..76bbe551351 100644 --- a/modules/filters/mod_charset_lite.c +++ b/modules/filters/mod_charset_lite.c @@ -181,7 +181,7 @@ static const char *add_charset_options(cmd_parms *cmd, void *in_dc, else if (!strcasecmp(flag, "NoImplicitAdd")) { dc->implicit_add = IA_NOIMPADD; } - if (!strcasecmp(flag, "TranslateAllMimeTypes")) { + else if (!strcasecmp(flag, "TranslateAllMimeTypes")) { dc->force_xlate = FX_FORCE; } else if (!strcasecmp(flag, "NoTranslateAllMimeTypes")) { @@ -337,6 +337,15 @@ static void xlate_insert_filter(request_rec *r) charset_dir_t *dc = ap_get_module_config(r->per_dir_config, &charset_lite_module); + if (dc && (dc->implicit_add == IA_NOIMPADD)) { + if (dc->debug >= DBGLVL_GORY) { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + "xlate output filter not added implicitly because " + "CharsetOptions included 'NoImplicitAdd'"); + } + return; + } + if (reqinfo) { if (reqinfo->output_ctx && !configured_on_output(r, XLATEOUT_FILTER_NAME)) { ap_add_output_filter(XLATEOUT_FILTER_NAME, reqinfo->output_ctx, r,