You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dg...@hyperreal.org on 1998/01/30 20:30:35 UTC
cvs commit: apache-1.3/src/main http_core.c
dgaudet 98/01/30 11:30:35
Modified: . STATUS
src CHANGES
src/main http_core.c
Log:
Fix Options and AllowOverrides merging in main_server lookup_defaults and
vhost lookup_defaults.
Revision Changes Path
1.138 +1 -0 apache-1.3/STATUS
Index: STATUS
===================================================================
RCS file: /export/home/cvs/apache-1.3/STATUS,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- STATUS 1998/01/30 14:51:49 1.137
+++ STATUS 1998/01/30 19:30:30 1.138
@@ -142,6 +142,7 @@
* some rfc2068 case insensitivity issues
* r->allowed cleanup
* References to undefined 'cwd' cell fixed in suexec.c
+ * fix options/allowoverride merging
Available Patches:
1.607 +6 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.606
retrieving revision 1.607
diff -u -r1.606 -r1.607
--- CHANGES 1998/01/30 14:49:55 1.606
+++ CHANGES 1998/01/30 19:30:31 1.607
@@ -1,5 +1,11 @@
Changes with Apache 1.3b4
+ *) Options and AllowOverrides weren't properly merging in the main
+ server setting inside vhosts (only an issue when you have no
+ <Directory> or other section containing an Options that affects
+ a request). Options +foo or -foo in the main_server wouldn't
+ affect the main_server's lookup defaults. [Dean Gaudet]
+
*) Variable 'cwd' was being used pointlessly before being set.
[Ken Coar] PR#1738
1.153 +21 -10 apache-1.3/src/main/http_core.c
Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- http_core.c 1998/01/30 03:36:56 1.152
+++ http_core.c 1998/01/30 19:30:34 1.153
@@ -112,9 +112,9 @@
conf->d_is_fnmatch = conf->d ? (is_fnmatch (conf->d) != 0) : 0;
conf->d_components = conf->d ? count_dirs (conf->d) : 0;
- conf->opts = dir ? OPT_UNSET : OPT_ALL;
+ conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_ALL;
conf->opts_add = conf->opts_remove = OPT_NONE;
- conf->override = dir ? OR_UNSET : OR_ALL;
+ conf->override = dir ? OR_UNSET : OR_UNSET|OR_ALL;
conf->content_md5 = 2;
@@ -158,11 +158,16 @@
conf->d_components = new->d_components;
conf->r = new->r;
- if (new->opts != OPT_UNSET) conf->opts = new->opts;
- if (new->opts_add) conf->opts |= new->opts_add;
- if (new->opts_remove) conf->opts &= ~(new->opts_remove);
+ if (!(new->opts & OPT_UNSET)) conf->opts = new->opts;
+ if (new->opts_add) {
+ conf->opts |= new->opts_add;
+ conf->opts &= ~OPT_UNSET;
+ }
+ if (new->opts_remove) {
+ conf->opts &= ~(new->opts_remove | OPT_UNSET);
+ }
- if (new->override != OR_UNSET) conf->override = new->override;
+ if (!(new->override & OR_UNSET)) conf->override = new->override;
if (new->default_type) conf->default_type = new->default_type;
if (new->auth_type) conf->auth_type = new->auth_type;
@@ -692,6 +697,7 @@
d->override = OR_ALL;
else
return pstrcat (cmd->pool, "Illegal override option ", w, NULL);
+ d->override &= ~OR_UNSET;
}
return NULL;
@@ -737,12 +743,17 @@
else
return pstrcat (cmd->pool, "Illegal option ", w, NULL);
- if (action == '-')
+ if (action == '-') {
d->opts_remove |= opt;
- else if (action == '+')
+ d->opts &= ~opt;
+ }
+ else if (action == '+') {
d->opts_add |= opt;
- else
- d->opts |= opt;
+ d->opts |= opt;
+ }
+ else {
+ d->opts |= opt;
+ }
}
return NULL;