- method loadInput txt =
- let add_terminating_slash s =
- if not(Pcre.pmatch ~rex:trailing_slash_RE s) &&
- not(Pcre.pmatch ~rex:has_xpointer_RE s) then s^"/" else s
- in
- let is_uri txt =
- try
- let u = UriManager.strip_xpointer (UriManager.uri_of_string txt) in
- ignore (Http_getter.resolve' u);
- true
- with
- | Http_getter_types.Key_not_found _
- | Http_getter_types.Unresolvable_URI _
- | UriManager.IllFormedUri ("cic:/" | "cic:") -> false
- | UriManager.IllFormedUri u -> failwith ("Malformed URI '" ^ u ^ "'")
+ method loadInput txt =
+ let txt = strip_blanks txt in
+ let fix_uri txt =
+ UriManager.string_of_uri
+ (UriManager.strip_xpointer (UriManager.uri_of_string txt))