diff src/settings.sml @ 856:86ec89baee01

cgi protocol
author Adam Chlipala <adamc@hcoop.net>
date Tue, 23 Jun 2009 17:59:23 -0400
parents 28e42b22424d
children 3d2f6cb6d54a
line wrap: on
line diff
--- a/src/settings.sml	Tue Jun 23 15:56:04 2009 -0400
+++ b/src/settings.sml	Tue Jun 23 17:59:23 2009 -0400
@@ -266,9 +266,15 @@
             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