X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_parser.ml;h=d6a8ddfe077020ab82713e74df9efa60d0a9afad;hb=1b40dfaab5c1d0b9c726b7606989b82aca7658d8;hp=1113b701edebb87d89c7d83efcb55f406f64327c;hpb=ca9cd0aeee0ce78a891f7f6091ca8704231a446d;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_parser.ml b/helm/DEVEL/ocaml-http/http_parser.ml index 1113b701e..d6a8ddfe0 100644 --- a/helm/DEVEL/ocaml-http/http_parser.ml +++ b/helm/DEVEL/ocaml-http/http_parser.ml @@ -118,7 +118,11 @@ let parse_headers ic = match generic_input_line ~sep:crlf ~ic with | "" -> List.rev headers | line -> - (let subs = Pcre.extract ~rex:header_RE line in + (let subs = + try + Pcre.extract ~rex:header_RE line + with Not_found -> raise (Invalid_header line) + in let header = try subs.(1)