*) mod_charset_lite: Add ForceAllMimeTypes sub-option to
CharsetOptions, allowing the administrator to skip the
mimetype checking that precedes translation.
PR 44458 [Eric Covener]
rename mod_charset_lite CharsetOption ForceAllMimeTypes to
TranslateAllMimeTypes (only about 18 hours old)
Submitted by: covener
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@629983
13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.2.9
+ *) mod_charset_lite: Add ForceAllMimeTypes sub-option to
+ CharsetOptions, allowing the administrator to skip the
+ mimetype checking that precedes translation.
+ PR 44458 [Eric Covener]
+
*) mod_proxy_http: Fix processing of chunked responses if
Connection: Transfer-Encoding is set in the response of the proxied
system. PR 44311 [Ruediger Pluem]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_charset_lite: Add TranslateAllMimeTypes sub-option to
- CharsetOptions. PR 44458
- Trunk version of patch:
- http://svn.apache.org/viewvc?rev=629615&view=rev
- http://svn.apache.org/viewvc?rev=629915&view=rev
- +1: covener, rpluem, jim
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
explicitly configured using the <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> directive, <code>NoImplicitAdd</code>
should be specified so that <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code>
doesn't add its filter.</dd>
+
+ <dt><code>TranslateAllMimeTypes | NoTranslateAllMimeTypes</code></dt>
+ <dd>Normally, <code class="module"><a href="../mod/mod_charset_lite.html">mod_charset_lite</a></code> will only perform
+ translation on a small subset of possible mimetypes. When the
+ <code>TranslateAllMimeTypes</code> keyord is specified for a given
+ configuration section, translation is performed without regard for
+ mimetype.</dd>
+
</dl>
</div>
>AddOutputFilter</directive> directive, <code>NoImplicitAdd</code>
should be specified so that <module>mod_charset_lite</module>
doesn't add its filter.</dd>
+
+ <dt><code>TranslateAllMimeTypes | NoTranslateAllMimeTypes</code></dt>
+ <dd>Normally, <module>mod_charset_lite</module> will only perform
+ translation on a small subset of possible mimetypes. When the
+ <code>TranslateAllMimeTypes</code> keyord is specified for a given
+ configuration section, translation is performed without regard for
+ mimetype.</dd>
+
</dl>
</usage>
</directivesynopsis>
const char *charset_default; /* how to ship on wire */
/** module does ap_add_*_filter()? */
enum {IA_INIT, IA_IMPADD, IA_NOIMPADD} implicit_add;
+ /** treat all mimetypes as text? */
+ enum {FX_INIT, FX_FORCE, FX_NOFORCE} force_xlate;
} charset_dir_t;
/* charset_filter_ctx_t is created for each filter instance; because the same
over->charset_source ? over->charset_source : base->charset_source;
a->implicit_add =
over->implicit_add != IA_INIT ? over->implicit_add : base->implicit_add;
+ a->force_xlate=
+ over->force_xlate != FX_INIT ? over->force_xlate : base->force_xlate;
return a;
}
else if (!strcasecmp(flag, "NoImplicitAdd")) {
dc->implicit_add = IA_NOIMPADD;
}
+ if (!strcasecmp(flag, "TranslateAllMimeTypes")) {
+ dc->force_xlate = FX_FORCE;
+ }
+ else if (!strcasecmp(flag, "NoTranslateAllMimeTypes")) {
+ dc->force_xlate = FX_NOFORCE;
+ }
else if (!strncasecmp(flag, "DebugLevel=", 11)) {
dc->debug = atoi(flag + 11);
}
*/
strcmp(mime_type, DIR_MAGIC_TYPE) == 0 ||
#endif
- strncasecmp(mime_type, "message/", 8) == 0) {
+ strncasecmp(mime_type, "message/", 8) == 0 ||
+ dc->force_xlate == FX_FORCE) {
rv = apr_xlate_open(&ctx->xlate,
dc->charset_default, dc->charset_source, f->r->pool);