summaryrefslogtreecommitdiff
path: root/src/settings.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.sml')
-rw-r--r--src/settings.sml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/settings.sml b/src/settings.sml
index 75c879f7..e1dcc809 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -266,9 +266,15 @@ val http = {name = "http",
supportsPush = true}
val () = addProtocol http
+val () = addProtocol {name = "cgi",
+ link = clibFile "request.o" ^ " " ^ clibFile "cgi.o",
+ supportsPush = false}
val curProto = ref http
-fun setProtocol p = curProto := p
+fun setProtocol name =
+ case getProtocol name of
+ NONE => raise Fail ("Unknown protocol " ^ name)
+ | SOME p => curProto := p
fun currentProtocol () = !curProto
end