]> gitweb @ CieloNegro.org - Lucu.git/blob - Network/HTTP/Lucu.hs
Lucu 0.7
[Lucu.git] / Network / HTTP / Lucu.hs
1 -- | Lucu is an HTTP daemonic library. It can be embedded in any
2 -- Haskell program and runs in an independent thread.
3 --
4 -- Features:
5 --
6 --   [/Full support of HTTP\/1.1/] Lucu supports request pipelining,
7 --   chunked I\/O, ETag comparison and \"100 Continue\".
8 --
9 --   [/Performance/] Lucu doesn't fork\/exec to handle requests like
10 --   CGI. It just spawns a new thread. Inter-process communication is
11 --   done with STM.
12 --
13 --   [/Affinity for RESTafarians/] Lucu is a carefully designed
14 --   web server for RESTful applications.
15 --
16 --   [/SSL connections/] Lucu can handle HTTP connections over SSL
17 --   layer.
18 --
19 -- Lucu is not a replacement for Apache or lighttpd. It is intended to
20 -- be used to create an efficient web-based RESTful application
21 -- without messing around FastCGI. It is also intended to be run
22 -- behind a reverse-proxy so it doesn't have the following (otherwise
23 -- essential) facilities:
24 --
25 --   [/Logging/] Lucu doesn't log any requests from any clients.
26 --
27 --   [/Client Filtering/] Lucu always accepts any clients. No IP
28 --   filter is implemented.
29 --
30 --   [/Bandwidth Limitting/] Lucu doesn't limit bandwidth it consumes.
31 --
32 --   [/Protection Against Wicked Clients/] Lucu is fragile against
33 --   wicked clients. No attacker should be able to cause a
34 --   buffer-overflow but can possibly DoS it.
35 --
36
37
38 module Network.HTTP.Lucu
39     ( -- * Entry Point
40       runHttpd
41
42       -- * Configuration
43     , module Network.HTTP.Lucu.Config
44
45       -- * Resource Tree
46     , ResourceDef(..)
47     , emptyResource
48     , ResTree
49     , mkResTree
50
51       -- * Resource Monad
52     , module Network.HTTP.Lucu.Resource
53
54       -- ** Things to be used in the Resource monad
55
56       -- *** Status Code
57     , StatusCode(..)
58
59       -- *** Abortion
60     , abort
61     , abortPurely
62     , abortA
63
64       -- *** ETag
65     , ETag(..)
66     , strongETag
67     , weakETag
68
69       -- *** MIME Type
70     , MIMEType(..)
71
72       -- *** Authorization
73     , AuthChallenge(..)
74     , AuthCredential(..)
75     
76       -- * Utility
77
78       -- ** Static file handling
79     , module Network.HTTP.Lucu.StaticFile
80     )
81     where
82
83 import Network.HTTP.Lucu.Abortion
84 import Network.HTTP.Lucu.Authorization
85 import Network.HTTP.Lucu.Config
86 import Network.HTTP.Lucu.ETag
87 import Network.HTTP.Lucu.Httpd
88 import Network.HTTP.Lucu.MIMEType
89 import Network.HTTP.Lucu.Resource hiding (driftTo)
90 import Network.HTTP.Lucu.Resource.Tree
91 import Network.HTTP.Lucu.Response
92 import Network.HTTP.Lucu.StaticFile