From a721e08341d8af740c50852ef617d615bcca28b9 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Fri, 4 Apr 2003 14:25:22 +0000 Subject: [PATCH] moved some constants from Http_daemon to Http_constants --- helm/DEVEL/ocaml-http/http_constants.ml | 11 ++++++++--- helm/DEVEL/ocaml-http/http_constants.mli | 9 +++++++++ helm/DEVEL/ocaml-http/http_daemon.ml | 5 ----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/helm/DEVEL/ocaml-http/http_constants.ml b/helm/DEVEL/ocaml-http/http_constants.ml index 268ead966..88d8617c9 100644 --- a/helm/DEVEL/ocaml-http/http_constants.ml +++ b/helm/DEVEL/ocaml-http/http_constants.ml @@ -19,7 +19,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) -let version = `HTTP_1_1;; -let server_string = "OCaml HTTP Daemon";; -let crlf = "\r\n" +let version = `HTTP_1_1 ;; +let server_string = "OCaml HTTP Daemon" ;; +let crlf = "\r\n" ;; + +let default_addr = "0.0.0.0" ;; +let default_port = 80 ;; +let default_timeout = 300 ;; +let default_mode = `Fork ;; diff --git a/helm/DEVEL/ocaml-http/http_constants.mli b/helm/DEVEL/ocaml-http/http_constants.mli index 881fe906a..bdce244fd 100644 --- a/helm/DEVEL/ocaml-http/http_constants.mli +++ b/helm/DEVEL/ocaml-http/http_constants.mli @@ -21,6 +21,8 @@ (** Constants *) +open Http_types + (** default HTTP version *) val version: Http_types.version @@ -30,3 +32,10 @@ val server_string: string (** "\r\n" string *) val crlf: string + (** {2 daemon default values} *) + +val default_addr: string (** default listen address *) +val default_port: int (** default listen port *) +val default_timeout: int (** default callbacks timeout *) +val default_mode: daemon_mode (** default request handling mode *) + diff --git a/helm/DEVEL/ocaml-http/http_daemon.ml b/helm/DEVEL/ocaml-http/http_daemon.ml index 8b71acbc8..9e0507dd2 100644 --- a/helm/DEVEL/ocaml-http/http_daemon.ml +++ b/helm/DEVEL/ocaml-http/http_daemon.ml @@ -26,11 +26,6 @@ open Http_types;; open Http_constants;; open Http_parser;; -let default_addr = "0.0.0.0" -let default_port = 80 -let default_timeout = 300 -let default_mode = `Fork - (** send raw data on outchan, flushing it afterwards *) let send_raw ~data outchan = output_string outchan data; -- 2.39.2