ASF Bugzilla – Attachment 32307 Details for
Bug 44221
CheckCaseOnly On does not stop Multiple Choices based on common basename
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Make "WANT_BASENAME_MATCH" configurable
file_44221.txt (text/plain), 1.84 KB, created by
Luc Pardon
on 2014-12-19 10:12:05 UTC
(
hide
)
Description:
Make "WANT_BASENAME_MATCH" configurable
Filename:
MIME Type:
Creator:
Luc Pardon
Created:
2014-12-19 10:12:05 UTC
Size:
1.84 KB
patch
obsolete
>--- modules/mappers/mod_speling.c 2014-12-19 09:16:43.847363515 +0100 >+++ modules/mappers/mod_speling.c 2014-12-19 09:26:11.612352383 +0100 >@@ -22,7 +22,6 @@ > #define APR_WANT_STRFUNC > #include "apr_want.h" > >-#define WANT_BASENAME_MATCH > > #include "httpd.h" > #include "http_core.h" >@@ -60,6 +59,7 @@ > typedef struct { > int enabled; > int case_only; >+ int basename_match; > } spconfig; > > /* >@@ -77,6 +77,7 @@ > > cfg->enabled = 0; > cfg->case_only = 0; >+ cfg->basename_match = 1; > return cfg; > } > >@@ -109,6 +110,9 @@ > AP_INIT_FLAG("CheckCaseOnly", ap_set_flag_slot, > (void*)APR_OFFSETOF(spconfig, case_only), OR_OPTIONS, > "whether or not to fix only miscapitalized requests"), >+ AP_INIT_FLAG("CheckBasenameMatch", ap_set_flag_slot, >+ (void*)APR_OFFSETOF(spconfig, basename_match), OR_OPTIONS, >+ "whether or not to find alternatives with same basename"), > { NULL } > }; > >@@ -329,9 +333,11 @@ > * > anything matching that spelling. With the extension-munging, > * > it would locate "foobar.html". Not perfect, but I ran into > * > that problem when I first wrote the module. >+ * >+ * Making it configurable lets everybody pick what suits best >+ * without breaking compatibility (19-Dec-2014) > */ >- else { >-#ifdef WANT_BASENAME_MATCH >+ else if (cfg->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 >@@ -356,7 +362,6 @@ > sp_new->name = apr_pstrdup(r->pool, dirent.name); > sp_new->quality = SP_VERYDIFFERENT; > } >-#endif > } > } > apr_dir_close(dir);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44221
:
24165
| 32307