Apache directory options
[hcoop/domtool2.git] / src / plugins / apache.sml
index 4ea8f22..f497825 100644 (file)
@@ -126,6 +126,11 @@ val cond_flag = fn (EVar "cond_nocase", _) => SOME "NC"
            | (EVar "ornext", _) => SOME "OR"
            | _ => NONE
 
+val apache_option = fn (EVar "execCGI", _) => SOME "ExecCGI"
+                    | (EVar "includesNOEXEC", _) => SOME "IncludesNOEXEC"
+                    | (EVar "indexes", _) => SOME "Indexes"
+                    | _ => NONE
+
 
 val vhostsChanged = ref false
 
@@ -330,5 +335,31 @@ val () = Env.action_two "errorDocument"
              write handler;
              write "\n"))
 
+val () = Env.action_one "options"
+        ("options", Env.list apache_option)
+        (fn opts =>
+            case opts of
+                [] => ()
+              | _ => (write "\tOptions";
+                      app (fn opt => (write " "; write opt)) opts;
+                      write "\n"))
+
+val () = Env.action_one "set_options"
+        ("options", Env.list apache_option)
+        (fn opts =>
+            case opts of
+                [] => ()
+              | _ => (write "\tOptions";
+                      app (fn opt => (write " +"; write opt)) opts;
+                      write "\n"))
+
+val () = Env.action_one "unset_options"
+        ("options", Env.list apache_option)
+        (fn opts =>
+            case opts of
+                [] => ()
+              | _ => (write "\tOptions";
+                      app (fn opt => (write " -"; write opt)) opts;
+                      write "\n"))
 
 end