X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_daemon.ml;h=f29b4c1d16390084af88c6268611e10a13ee7610;hb=3bb4ce11fb9d4c6375483a80344beb94c4517dd7;hp=d089ce79cc3d7de55061bb761d70752935a4477b;hpb=65b77b4e2d08e882b3e0212674a04520527267bb;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_daemon.ml b/helm/DEVEL/ocaml-http/http_daemon.ml index d089ce79c..f29b4c1d1 100644 --- a/helm/DEVEL/ocaml-http/http_daemon.ml +++ b/helm/DEVEL/ocaml-http/http_daemon.ml @@ -2,7 +2,7 @@ (* OCaml HTTP - do it yourself (fully OCaml) HTTP daemon - Copyright (C) <2002> Stefano Zacchiroli + Copyright (C) <2002-2004> Stefano Zacchiroli This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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;