package tiny_httpd

  1. Overview
  2. Docs
Minimal HTTP server using good old threads

Install

Dune Dependency

Authors

Maintainers

Sources

tiny_httpd-0.14.tbz
sha256=23feafd49bcb14fd43b7af513ba8d02d53ee07e2ae544195d65082a8fd69c07e
sha512=64bdc8a5608c923fdfe807dfdb7b43a7b3aadf68f854190d331552cbf12cc43d6cf63d885f07d1d1f8eaa5edf93d96656f68f7d219ac10898d8b3c7d33d1b095

doc/tiny_httpd/Tiny_httpd_util/index.html

Module Tiny_httpd_utilSource

Some utils for writing web servers

  • since 0.2
Sourceval percent_encode : ?skip:(char -> bool) -> string -> string

Encode the string into a valid path following https://tools.ietf.org/html/rfc3986#section-2.1

  • parameter skip

    if provided, allows to preserve some characters, e.g. '/' in a path.

Sourceval percent_decode : string -> string option

Inverse operation of percent_encode. Can fail since some strings are not valid percent encodings.

Sourceval split_query : string -> string * string

Split a path between the path and the query

  • since 0.5
Sourceval split_on_slash : string -> string list

Split a string on '/', remove the trailing '/' if any.

  • since 0.6
Sourceval get_non_query_path : string -> string

get the part of the path that is not the query parameters.

  • since 0.5
Sourceval get_query : string -> string

Obtain the query part of a path.

  • since 0.4
Sourceval parse_query : string -> ((string * string) list, string) result

Parse a query as a list of '&' or ';' separated key=value pairs. The order might not be preserved.

  • since 0.3
OCaml

Innovation. Community. Security.