httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject mod_speling changes in trunk and backport
Date Tue, 23 Feb 2016 19:24:57 GMT
There were two changes to mod_speling in trunk in 2013/2014. They were 
motivated by PR 44221: although the docs claim that using "CheckCaseOnly 
On" "limits the action of the spelling correction to lower/upper case 
changes. Other potential corrections are not performed." In fact 
mod_speling still checks for content files which only differ in the file 
name suffix form the request URI. That part of the code was contained in 
an #ifdef but active by default. The changes introduce a new directive 
that allows to control that part of the behavior by configuration.

Now the question: it seems to me that due to the change being done in 
two steps, now the directive CheckCaseOnly and the new one 
CheckBasenameMatch are not independent of each other. Setting 
CheckBasenameMatch  to "On" only enables the suffix handling if 
CheckCaseOnly if "Off". For improved compatibility and for better 
orthogonality I would suggest to keep the features separate from each 
other, ie.:

Index: modules/mappers/mod_speling.c
--- modules/mappers/mod_speling.c       (revision 1731929)
+++ modules/mappers/mod_speling.c       (working copy)
@@ -326,8 +326,7 @@
           * because it won't find anything matching that spelling.
           * With the extension-munging, it would locate "foobar.html".
-        else if ((cfg->check_case_only == 0) &&
-                 (cfg->check_basename_match == 1)) {
+        else if (cfg->check_basename_match == 1) {
               * Okay... we didn't find anything. Now we take out the 
               * power tools. There are several cases here. Someone 
might have

That way the old changes could be ported back to 2.4 with the only 
change that the default for CheckBasenameMatch would be "On" in 2.4 for 
compatibility reasons and "Off" in trunk to satisfy the principle of 
least surprise.



View raw message