mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-07 03:35:34 -05:00
14 lines
473 B
OCaml
14 lines
473 B
OCaml
(** {1 Some utils for writing web servers}
|
|
|
|
@since 0.2
|
|
*)
|
|
|
|
val percent_encode : ?skip:(char -> bool) -> string -> string
|
|
(** Encode the string into a valid path following
|
|
https://tools.ietf.org/html/rfc3986#section-2.1
|
|
@param skip if provided, allows to preserve some characters, e.g. '/' in a path.
|
|
*)
|
|
|
|
val percent_decode : string -> string option
|
|
(** Inverse operation of {!percent_encode}.
|
|
Can fail since some strings are not valid percent encodings. *)
|