]> gitweb @ CieloNegro.org - Lucu.git/blob - Network/HTTP/Lucu.hs
Examples now compile.
[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 module Network.HTTP.Lucu
37     ( -- * Entry Point
38       runHttpd
39
40       -- * Configuration
41     , module Network.HTTP.Lucu.Config
42
43       -- * Resource Tree
44     , ResourceDef(..)
45     , emptyResource
46     , ResTree
47     , mkResTree
48
49       -- * Resource Monad
50     , module Network.HTTP.Lucu.Resource
51
52       -- ** Things to be used in the Resource monad
53
54       -- *** Status Code
55     , StatusCode(..)
56
57       -- *** Abortion
58     , abort
59     , abortPurely
60     , abortA
61
62       -- *** ETag
63     , ETag(..)
64     , strongETag
65     , weakETag
66     , parseETag
67
68       -- *** MIME Type
69     , MIMEType(..)
70     , mkMIMEType
71     , parseMIMEType
72
73       -- *** Authorization
74     , AuthChallenge(..)
75     , AuthCredential(..)
76     
77       -- * Utility
78
79       -- ** Static file handling
80     , module Network.HTTP.Lucu.StaticFile
81     )
82     where
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