X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fhttp_parser_sanity.ml;h=8e6ef7d549eb777b5a3992e3b0fc66b651964641;hb=03d1ddf4a7fdf03fd497babd84d1963048253f0d;hp=19204e870ba75ac52ecda5616a990ebe72df11da;hpb=ca9cd0aeee0ce78a891f7f6091ca8704231a446d;p=helm.git diff --git a/helm/DEVEL/ocaml-http/http_parser_sanity.ml b/helm/DEVEL/ocaml-http/http_parser_sanity.ml index 19204e870..8e6ef7d54 100644 --- a/helm/DEVEL/ocaml-http/http_parser_sanity.ml +++ b/helm/DEVEL/ocaml-http/http_parser_sanity.ml @@ -1,4 +1,24 @@ +(* + OCaml HTTP - do it yourself (fully OCaml) HTTP daemon + + Copyright (C) <2002> 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*) + open Neturl;; open Printf;; @@ -84,6 +104,9 @@ let heal_header (name, value) = heal_header_name name; heal_header_value name -let url_of_string = url_of_string request_uri_syntax +let url_of_string s = + try + url_of_string request_uri_syntax s + with Neturl.Malformed_URL -> raise (Malformed_URL s) let string_of_url = Neturl.string_of_url