]> matita.cs.unibo.it Git - helm.git/commitdiff
reverted code parameter on respond function to its original optionality
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 20 May 2004 16:02:25 +0000 (16:02 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 20 May 2004 16:02:25 +0000 (16:02 +0000)
helm/DEVEL/ocaml-http/http_daemon.ml
helm/DEVEL/ocaml-http/http_daemon.mli

index d089ce79cc3d7de55061bb761d70752935a4477b..d311e451f00ec2269430aebf87f7f5ece4cc490b 100644 (file)
@@ -84,7 +84,7 @@ let foo_body code body =
 let send_foo_body code body = send_raw ~data:(foo_body code body)
 
   (* Warning: keep default values in sync with Http_response.response class *)
-let respond ?(body = "") ?(headers = []) ?version ~code outchan =
+let respond ?(body = "") ?(headers = []) ?version ?(code = `Code 200) outchan =
   send_basic_headers ?version ~code outchan;
   send_headers ~headers outchan;
   send_header "Content-Length" (string_of_int (String.length body)) outchan;
index 3207261f772f2e54c5a349c1aec35217d53e3f75..a03e40c8686aa43e9053f58f0058893f7813a691 100644 (file)
@@ -63,7 +63,7 @@ val send_file: src:Http_types.file_source -> out_channel -> unit
   status is 200, default response HTTP version is Http_common.http_version *)
 val respond:
   ?body:string -> ?headers:(string * string) list ->
-  ?version:Http_types.version -> code:Http_types.status_code ->
+  ?version:Http_types.version -> ?code:Http_types.status_code ->
   out_channel ->
     unit