- version_of_string http_version_raw) (* version *)
- with Neturl.Malformed_URL -> raise (Malformed_request_URI uri_raw))
- | _ -> raise (Malformed_request request_line)
+ None) (* no version given *)
+ | [ meth_raw; uri_raw; http_version_raw ] -> (* HTTP 1.{0,1} *)
+ (method_of_string meth_raw, (* method *)
+ Http_parser_sanity.url_of_string uri_raw, (* uri *)
+ Some (version_of_string http_version_raw)) (* version *)
+ | _ -> raise (Malformed_request request_line))
+ with Malformed_URL url -> raise (Malformed_request_URI url)