X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_common.ml;h=1db14b7fcee8e5529168140e508c627998c6755f;hb=9261580b5e489f52d7e67bbcc918a564e0848035;hp=8e59dbd580a9eb021cca019d283055636432eee6;hpb=6a8da4dd52033adfe80533f7467439aec1561147;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_common.ml b/helm/DEVEL/ocaml-http/http_common.ml index 8e59dbd58..1db14b7fc 100644 --- a/helm/DEVEL/ocaml-http/http_common.ml +++ b/helm/DEVEL/ocaml-http/http_common.ml @@ -19,11 +19,20 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) +open Printf;; + +let debug = ref false +let debug_print s = + if !debug then + prerr_endline (sprintf "DEBUG: %s" s) + exception Invalid_HTTP_version of string exception Invalid_code of int exception Invalid_status of Http_types.status let http_version = `HTTP_1_1 +let server_string = "OCaml HTTP Daemon" +let crlf = "\r\n" let string_of_version = function | `HTTP_1_0 -> "HTTP/1.0"