Source file Simple_httpd.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

(** Simple Httpd.

    A small HTTP/1.1 server, in pure OCaml, along with some utilities
    to build small websites. It aims to be simple (not too many dependencies)
    but still provide features which would suffice for most simple websites.

    It uses domain and will treat request using a fixed number of threads
    that you can choose and no more. On each domain/thread runs a scheduler
    written with effect to treat several request concurrently. Test shows that
    it can handle hundreds of request simultaneously.
*)

module Util = Util

module Sfd = Util.Sfd

module Input = Input

module Output = Output

module Address = Address

module Client = Async.Client

module Async = Async

module Io = Async.Io

module Log = Async.Log

module Mutex = Async.Mutex

module Semaphore = Async.Semaphore

module Resources = Resources

module Process = Process

module Method = Method

module Headers = Headers

module Cookies = Cookies

module Camlzip = Camlzip

module Stats = Stats

module Request = Request

module Response_code = Response_code

module Response = Response

module WebSocket = WebSocket

module Route = Route

module Filter = Route.Filter

module Session = Session

module Dir = Dir

module Html = Html

module Server = Server

module Auth = Auth

module Status = Status

module Host = Host