extern val addDefaultCharset : no_spaces -> [^Vhost];
{{See <a href="http://httpd.apache.org/docs/2.0/mod/core.html#adddefaultcharset">the
Apache documentation</a>.}}
+
+extern type file_extension;
+extern val cgiExtension : file_extension -> [^Vhost];
+{{Ask for all files ending in a particular extension to be executed as CGI.}}
| (EApp ((EVar "use_cert", _), s), _) => Option.map SOME (Env.string s)
| _ => NONE
+fun validExtension s =
+ size s > 0
+ andalso size s < 20
+ andalso CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"_") s
+
+val _ = Env.type_one "file_extension"
+ Env.string
+ validExtension
+
val defaults = [("WebPlaces",
(TList (TBase "web_place", dl), dl),
(fn () => (EList (map webPlaceDefault Config.Apache.webNodes_default), dl))),
app (fn opt => (write " -"; write opt)) opts;
write "\n"))
+val () = Env.action_one "cgiExtension"
+ ("extension", Env.string)
+ (fn ext => (write "\tAddHandler cgi-script ";
+ write ext;
+ write "\n"))
+
val () = Env.action_one "directoryIndex"
("filenames", Env.list Env.string)
(fn opts =>