conf->override = dir ? OR_UNSET : OR_UNSET|OR_ALL;
conf->content_md5 = 2;
+ conf->accept_path_info = 2;
conf->use_canonical_name = USE_CANONICAL_NAME_UNSET;
conf->handler = NULL;
conf->output_filters = NULL;
conf->input_filters = NULL;
+
return (void *)conf;
}
if ((new->content_md5 & 2) == 0) {
conf->content_md5 = new->content_md5;
}
+ if ((new->accept_path_info & 2) == 0) {
+ conf->accept_path_info = new->accept_path_info;
+ }
if (new->use_canonical_name != USE_CANONICAL_NAME_UNSET) {
conf->use_canonical_name = new->use_canonical_name;
}
return NULL;
}
+static const char *set_accept_path_info(cmd_parms *cmd, void *d_, int arg)
+{
+ core_dir_config *d=d_;
+
+ d->accept_path_info = arg != 0;
+ return NULL;
+}
+
static const char *set_use_canonical_name(cmd_parms *cmd, void *d_,
const char *arg)
{
#endif
AP_INIT_TAKE1("AddDefaultCharset", set_add_default_charset, NULL, OR_FILEINFO,
"The name of the default charset to add to any Content-Type without one or 'Off' to disable"),
+AP_INIT_FLAG("AcceptPathInfo", set_accept_path_info, NULL, OR_FILEINFO,
+ "whether or not files with PATH_INFO will be served by the core handler"),
/* Old resource config file commands */
if (conf->handler && strcmp(conf->handler, "none"))
r->handler = conf->handler;
+ /* Deal with the poor soul who is trying to force path_info to be
+ * accepted within the core_handler, where they will let the subreq
+ * address it's contents. This can only be toggled on by the user,
+ * and modules can't override the user's discresion, except in their
+ * own module fixup phase.
+ */
+ if (!r->used_path_info & (conf->accept_path_info & 1)) {
+ r->used_path_info = conf->accept_path_info;
+ }
+
return OK;
}