X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_types.ml;h=ebbcbcc3519b6ef746f2e3580ad275fe1744f7af;hb=b135ff929bdf58c2e076a6462ab03e6ed1067654;hp=011cbcb29745e521a35d567549a36eeb75a521a0;hpb=87ac29023be698256db43ae12b579bf7d7b7235b;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_types.ml b/helm/DEVEL/ocaml-http/http_types.ml index 011cbcb29..ebbcbcc35 100644 --- a/helm/DEVEL/ocaml-http/http_types.ml +++ b/helm/DEVEL/ocaml-http/http_types.ml @@ -108,9 +108,11 @@ type status = ] exception Invalid_header of string +exception Invalid_header_name of string +exception Invalid_header_value of string exception Invalid_HTTP_version of string exception Invalid_code of int -exception Invalid_status of Http_types.status +exception Invalid_status of status exception Malformed_query of string exception Malformed_query_part of string * string @@ -149,8 +151,10 @@ class type response = method addContents: string -> unit method addContentsBuf: Buffer.t -> unit method addHeader: name:string -> value:string -> unit + method addHeaders: (string * string) list -> unit method addBasicHeaders: unit method replaceHeader: name:string -> value:string -> unit + method replaceHeaders: (string * string) list -> unit method removeHeader: name:string -> unit method hasHeader: name:string -> bool method header: name:string -> string @@ -176,3 +180,15 @@ class type request = method paramAll: string -> string list method params: (string * string) list end +class type connection = + object + method getRequest: request option + method respond_with: response -> unit + method close: unit + end +class type daemon = + object + method accept: connection + method getRequest: request * connection + end +