package cohttp

  1. Overview
  2. Docs
An OCaml library for HTTP clients and servers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

cohttp-v6.0.0_beta2.tbz
sha256=90ecec8bd580411b4272c031b2f6b9c0a50485d20683c6a9c615242f3724b017
sha512=83ef539469d982862174a929e9baeb5b2a34e9323ee577d8be7148ebed9e785d835d59cc22982bc083bb872e4544616e2bf531ed7edf96bc397151c28bf618d6

doc/cohttp/Cohttp/Path/index.html

Module Cohttp.PathSource

Sourceval resolve_local_file : docroot:string -> uri:Uri.t -> string

Resolve the given URI to a local file in the given docroot.

This decodes and normalises the Uri. It strips out .. characters so that the request will not escape the docroot. The returned filepath is fully qualified iff the given docroot is fully qualified.