package ocsigenserver

  1. Overview
  2. Docs
A full-featured and extensible Web server

Install

Dune Dependency

Authors

Maintainers

Sources

4.0.2.tar.gz
md5=5ea779e418bf936d7301057d6d95011c
sha512=e27b9ad71ac2bd0e817ff35b66de606ffabd5b71b88b34974cbf41181e5a824767616fdd2b7908539bdd394c0873aaacdc7768f6dc7ad3f9dc33e8eb1a6f9fa6

doc/ocsigenserver.http/Ocsigen_charset_mime/index.html

Module Ocsigen_charset_mimeSource

Sourcetype extension = string
Sourcetype file = string
Sourcetype filename = string

Charset

Sourcetype charset = string

By convention, "no specified charset" is represented by the empty string

Sourceval no_charset : charset
Sourcetype charset_assoc

Association between extensions and charset, with a default value.

Sourceval empty_charset_assoc : ?default:charset -> unit -> charset_assoc

All files are mapped to no_charset

Sourceval empty_mime_assoc : ?default:charset -> unit -> charset_assoc
Sourceval find_charset : string -> charset_assoc -> charset
Sourceval default_charset : charset_assoc -> charset

Functions related to the default charset in the association

Sourceval set_default_charset : charset_assoc -> charset -> charset_assoc
Sourceval update_charset_ext : charset_assoc -> extension -> charset -> charset_assoc

Updates the mapping between extensions from a file to its charset. The update can be specified using the extension of the file, the name of the file, or the entire file (with its path)

Sourceval update_charset_file : charset_assoc -> filename -> charset -> charset_assoc
Sourceval update_charset_regexp : charset_assoc -> Pcre.regexp -> charset -> charset_assoc
Sourcetype mime_type = string

MIME types; the default value is "application/octet-stream"

Sourceval default_mime_type : mime_type
Sourcetype mime_assoc

association between extensions and mime types, with default value

Sourceval default_mime_assoc : unit -> mime_assoc

Default values, obtained by reading the file specified by Ocsigen_config_static.get_mimefile

Sourceval parse_mime_types : filename:string -> mime_assoc

Parsing of a file containing mime associations, such as /etc/mime-types

Sourceval find_mime : file -> mime_assoc -> string
Sourceval default_mime : mime_assoc -> mime_type
Sourceval set_default_mime : mime_assoc -> mime_type -> mime_assoc
Sourceval update_mime_ext : mime_assoc -> extension -> mime_type -> mime_assoc
Sourceval update_mime_file : mime_assoc -> filename -> mime_type -> mime_assoc
Sourceval update_mime_regexp : mime_assoc -> Pcre.regexp -> mime_type -> mime_assoc
OCaml

Innovation. Community. Security.