View | Details | Raw Unified | Return to bug 44221
Collapse All | Expand All

(-)file_not_specified_in_diff (-5 / +10 lines)
Line  Link Here
0
-- modules/mappers/mod_speling.c       2014-12-19 09:16:43.847363515 +0100
0
++ modules/mappers/mod_speling.c       2014-12-19 09:26:11.612352383 +0100
Lines 22-28 Link Here
22
#define APR_WANT_STRFUNC
22
#define APR_WANT_STRFUNC
23
#include "apr_want.h"
23
#include "apr_want.h"
24
#define WANT_BASENAME_MATCH
25
#include "httpd.h"
24
#include "httpd.h"
26
#include "http_core.h"
25
#include "http_core.h"
Lines 60-65 Link Here
60
typedef struct {
59
typedef struct {
61
    int enabled;
60
    int enabled;
62
    int case_only;
61
    int case_only;
62
    int basename_match;
63
} spconfig;
63
} spconfig;
64
/*
64
/*
Lines 77-82 Link Here
77
    cfg->enabled = 0;
77
    cfg->enabled = 0;
78
    cfg->case_only = 0;
78
    cfg->case_only = 0;
79
    cfg->basename_match = 1;
79
    return cfg;
80
    return cfg;
80
}
81
}
Lines 109-114 Link Here
109
    AP_INIT_FLAG("CheckCaseOnly", ap_set_flag_slot,
110
    AP_INIT_FLAG("CheckCaseOnly", ap_set_flag_slot,
110
                  (void*)APR_OFFSETOF(spconfig, case_only), OR_OPTIONS,
111
                  (void*)APR_OFFSETOF(spconfig, case_only), OR_OPTIONS,
111
                 "whether or not to fix only miscapitalized requests"),
112
                 "whether or not to fix only miscapitalized requests"),
113
    AP_INIT_FLAG("CheckBasenameMatch", ap_set_flag_slot,
114
                  (void*)APR_OFFSETOF(spconfig, basename_match), OR_OPTIONS,
115
                 "whether or not to find alternatives with same basename"),
112
    { NULL }
116
    { NULL }
113
};
117
};
Lines 329-337 Link Here
329
         * > anything matching that spelling. With the extension-munging,
333
         * > anything matching that spelling. With the extension-munging,
330
         * > it would locate "foobar.html". Not perfect, but I ran into
334
         * > it would locate "foobar.html". Not perfect, but I ran into
331
         * > that problem when I first wrote the module.
335
         * > that problem when I first wrote the module.
336
         *
337
         * Making it configurable lets everybody pick what suits best
338
         * without breaking compatibility (19-Dec-2014)
332
         */
339
         */
333
        else {
340
        else if (cfg->basename_match == 1) {
334
#ifdef WANT_BASENAME_MATCH
335
            /*
341
            /*
336
             * Okay... we didn't find anything. Now we take out the hard-core
342
             * Okay... we didn't find anything. Now we take out the hard-core
337
             * power tools. There are several cases here. Someone might have
343
             * power tools. There are several cases here. Someone might have
Lines 356-362 Link Here
356
                sp_new->name = apr_pstrdup(r->pool, dirent.name);
362
                sp_new->name = apr_pstrdup(r->pool, dirent.name);
357
                sp_new->quality = SP_VERYDIFFERENT;
363
                sp_new->quality = SP_VERYDIFFERENT;
358
            }
364
            }
359
#endif
360
        }
365
        }
361
    }
366
    }
362
    apr_dir_close(dir);
367
    apr_dir_close(dir);

Return to bug 44221