From 63410c324ca4e89c4fa9e5ca5b30e8a30f509ffd Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 20 May 2004 16:02:25 +0000 Subject: [PATCH] reverted code parameter on respond function to its original optionality --- helm/DEVEL/ocaml-http/http_daemon.ml | 2 +- helm/DEVEL/ocaml-http/http_daemon.mli | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/DEVEL/ocaml-http/http_daemon.ml b/helm/DEVEL/ocaml-http/http_daemon.ml index d089ce79c..d311e451f 100644 --- a/helm/DEVEL/ocaml-http/http_daemon.ml +++ b/helm/DEVEL/ocaml-http/http_daemon.ml @@ -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; diff --git a/helm/DEVEL/ocaml-http/http_daemon.mli b/helm/DEVEL/ocaml-http/http_daemon.mli index 3207261f7..a03e40c86 100644 --- a/helm/DEVEL/ocaml-http/http_daemon.mli +++ b/helm/DEVEL/ocaml-http/http_daemon.mli @@ -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 -- 2.39.2