From: Rainer Jung
Date: Thu, 25 Feb 2016 10:09:09 +0000 (+0000)
Subject: mod_speling: make behavior of CheckCaseOnly and
X-Git-Tag: 2.5.0-alpha~2015
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3dc9649f3190b8481586d6aaebe9c4c4fe2ca769;p=thirdparty%2Fapache%2Fhttpd.git
mod_speling: make behavior of CheckCaseOnly and
the new CheckBasenameMatch orthogonal, so one
can combine them and they don't influence each
other.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732273 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/mod_speling.xml b/docs/manual/mod/mod_speling.xml
index e88916abe8a..5e53a2b8649 100644
--- a/docs/manual/mod/mod_speling.xml
+++ b/docs/manual/mod/mod_speling.xml
@@ -127,18 +127,14 @@ module
When set, this directive limits the action of the spelling correction
- to lower/upper case changes.
- Other potential corrections are not performed.
-
+ to lower/upper case changes. Other potential corrections are not performed,
+ except when CheckBasenameMatch is also set.
CheckBasenameMatch
-Extend the action of the speling module to also check filename
-without paying attention to the extention. (e.g. foo.gif and foo.jpg).
-This can be particulary useful in conjunction with
-MultiViews
+Also match files with differing file name extensions.
CheckBasenameMatch on|off
CheckBasenameMatch Off
@@ -150,8 +146,11 @@ This can be particulary useful in conjunction with
Options
- This option has no effect if CheckCaseOnly is set.
-
+ When set, this directive extends the action of the spelling correction
+ to the file name extension. For example a file foo.gif will
+ match a request for foo or foo.jpg. This can be
+ particulary useful in conjunction with
+ MultiViews.
diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c
index ea2bdbc92fa..d0ac5b2b98d 100644
--- a/modules/mappers/mod_speling.c
+++ b/modules/mappers/mod_speling.c
@@ -326,8 +326,7 @@ static int check_speling(request_rec *r)
* 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 hard-core
* power tools. There are several cases here. Someone might have