[Pkg-apache-commits] r1067 - in /trunk/apache2: README.Debian changelog config-dir/mods-available/mime.conf patches/00list patches/070_RemoveType_override_mime.types.dpatch

sf at alioth.debian.org sf at alioth.debian.org
Mon Oct 19 17:55:44 UTC 2009


Author: sf
Date: Mon Oct 19 17:55:44 2009
New Revision: 1067

URL: http://svn.debian.org/wsvn/pkg-apache/?sc=1&rev=1067
Log:
Make RemoveType override the info from TypesConfig and adjust definitions
for .es and .tr

Added:
    trunk/apache2/patches/070_RemoveType_override_mime.types.dpatch
Modified:
    trunk/apache2/README.Debian
    trunk/apache2/changelog
    trunk/apache2/config-dir/mods-available/mime.conf
    trunk/apache2/patches/00list

Modified: trunk/apache2/README.Debian
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/README.Debian?rev=1067&op=diff
==============================================================================
--- trunk/apache2/README.Debian (original)
+++ trunk/apache2/README.Debian Mon Oct 19 17:55:44 2009
@@ -295,23 +295,7 @@
 In most cases this means that no matching VirtualHost definition could be
 found for an incoming request.
 
-5) Support for Spanish and Turkish language with mod_negotiation
-
-Currently Apache will send Spanish and Turkish language files with the wrong
-mime types because the extensions .es and .tr have entries in /etc/mime.types
-for application/ecmascript and application/x-troff.
-
-In order to make Spanish and Turkish language support work, you need to either
-remove these entries from /etc/mime.types, or add something like
-
-    <Files *.html.tr.utf8>
-        ForceType text/html
-    </Files>
-
-to your Apache configuration. Of course, this has to be ajusted to the actual
-filenames you use.
-
-6) Message "Couldn't create pollset in child; check user or system limits" in
+5) Message "Couldn't create pollset in child; check user or system limits" in
   error log
 
 On Linux kernels since 2.6.27.8, the value in
@@ -336,7 +320,7 @@
 setting fs.epoll.max_user_watches. On most systems, max_user_watches should be
 high enough by default.
 
-7) Message "Server should be SSL-aware but has no certificate configured" in
+6) Message "Server should be SSL-aware but has no certificate configured" in
    error log
 
 Since 2.2.12, Apache is stricter about certain misconfigurations concerning

Modified: trunk/apache2/changelog
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/changelog?rev=1067&op=diff
==============================================================================
--- trunk/apache2/changelog (original)
+++ trunk/apache2/changelog Mon Oct 19 17:55:44 2009
@@ -1,3 +1,11 @@
+apache2 (2.2.14-2) UNRELEASED; urgency=low
+
+  * Allow RemoveType to override the types from /etc/mime.types. This allows
+    to use .es and .tr for Spanish and Turkish files in mod_negotiation.
+    Closes: #496080
+
+ -- Stefan Fritsch <sf at debian.org>  Mon, 19 Oct 2009 19:50:11 +0200
+
 apache2 (2.2.14-1) unstable; urgency=low
 
   * New upstream version:

Modified: trunk/apache2/config-dir/mods-available/mime.conf
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/config-dir/mods-available/mime.conf?rev=1067&op=diff
==============================================================================
--- trunk/apache2/config-dir/mods-available/mime.conf (original)
+++ trunk/apache2/config-dir/mods-available/mime.conf Mon Oct 19 17:55:44 2009
@@ -73,7 +73,8 @@
 AddLanguage el .el
 AddLanguage en .en
 AddLanguage eo .eo
-# See README.Debian for Spanish
+# es is ecmascript in /etc/mime.types
+RemoveType  es
 AddLanguage es .es
 AddLanguage et .et
 AddLanguage fr .fr
@@ -91,7 +92,8 @@
 AddLanguage pt-BR .pt-br
 AddLanguage ru .ru
 AddLanguage sv .sv
-# See README.Debian for Turkish
+# tr is troff in /etc/mime.types
+RemoveType  tr
 AddLanguage tr .tr
 AddLanguage zh-CN .zh-cn
 AddLanguage zh-TW .zh-tw

Modified: trunk/apache2/patches/00list
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/patches/00list?rev=1067&op=diff
==============================================================================
--- trunk/apache2/patches/00list (original)
+++ trunk/apache2/patches/00list Mon Oct 19 17:55:44 2009
@@ -19,6 +19,7 @@
 067_fix_segfault_in_ab.dpatch
 068_mod_dav_detect_EOF.dpatch
 069_no_deflate_for_HEAD.dpatch
+070_RemoveType_override_mime.types.dpatch
 099_config_guess_sub_update
 200_cp_suexec.dpatch
 201_build_suexec-custom.dpatch

Added: trunk/apache2/patches/070_RemoveType_override_mime.types.dpatch
URL: http://svn.debian.org/wsvn/pkg-apache/trunk/apache2/patches/070_RemoveType_override_mime.types.dpatch?rev=1067&op=file
==============================================================================
--- trunk/apache2/patches/070_RemoveType_override_mime.types.dpatch (added)
+++ trunk/apache2/patches/070_RemoveType_override_mime.types.dpatch Mon Oct 19 17:55:44 2009
@@ -1,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Make RemoveType override the info from TypesConfig
+
+ at DPATCH@
+commit 22de79599d8b6bf44a9e590f1a66166f5e9742fd
+Author: Stefan Fritsch <sf at apache.org>
+Date:   Sat Oct 3 12:13:41 2009 +0000
+
+    Make RemoveType override the info from TypesConfig
+    
+    
+    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821298 13f79535-47bb-0310-9956-ffa450edef68
+
+diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c
+index 9570976..3cde932 100644
+--- a/modules/http/mod_mime.c
++++ b/modules/http/mod_mime.c
+@@ -274,6 +274,16 @@ static const char *add_extension_info(cmd_parms *cmd, void *m_,
+ }
+ 
+ /*
++ * As RemoveType should also override the info from TypesConfig, we add an
++ * empty string as type instead of actually removing the type.
++ */
++static const char *remove_extension_type(cmd_parms *cmd, void *m_,
++                                         const char *ext)
++{
++    return add_extension_info(cmd, m_, "", ext);
++}
++
++/*
+  * Note handler names are un-added with each per_dir_config merge.
+  * This keeps the association from being inherited, but not
+  * from being re-added at a subordinate level.
+@@ -403,7 +413,7 @@ static const command_rec mime_cmds[] =
+     AP_INIT_ITERATE("RemoveOutputFilter", remove_extension_info,
+         (void *)APR_OFFSETOF(extension_info, output_filters), OR_FILEINFO,
+         "one or more file extensions"),
+-    AP_INIT_ITERATE("RemoveType", remove_extension_info,
++    AP_INIT_ITERATE("RemoveType", remove_extension_type,
+         (void *)APR_OFFSETOF(extension_info, forced_type), OR_FILEINFO,
+         "one or more file extensions"),
+     AP_INIT_TAKE1("TypesConfig", set_types_config, NULL, RSRC_CONF,
+@@ -819,7 +829,8 @@ static int find_ct(request_rec *r)
+ 
+         if (exinfo != NULL) {
+ 
+-            if (exinfo->forced_type) {
++            /* empty string is treated as special case for RemoveType */
++            if (exinfo->forced_type && *exinfo->forced_type) {
+                 ap_set_content_type(r, exinfo->forced_type);
+                 found = 1;
+             }




More information about the Pkg-apache-commits mailing list