X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu.hs;h=52315d6952afdce4e2c0e07600627b8a03dfd8ab;hb=8e2a25fd631e17a9c7b3e13c4e62635b2c1259bf;hp=3f4350bc35004b8a23066616b232914fdcfcb943;hpb=40c0d61e88920807a91b8f3c4419b08032988d76;p=Lucu.git diff --git a/Network/HTTP/Lucu.hs b/Network/HTTP/Lucu.hs index 3f4350b..52315d6 100644 --- a/Network/HTTP/Lucu.hs +++ b/Network/HTTP/Lucu.hs @@ -1,54 +1,92 @@ -module Network.HTTP.Lucu - ( -- Abortion - abort - , abortA - - -- Config - , Config(..) - , defaultConfig - - -- ETag - , ETag - , mkETag - , strongETag - , weakETag +-- | Lucu is an HTTP daemonic library. It can be embedded in any +-- Haskell program and runs in an independent thread. +-- +-- Features: +-- +-- [/Full support of HTTP\/1.1/] Lucu supports request pipelining, +-- chunked I\/O, ETag comparison and \"100 Continue\". +-- +-- [/Performance/] Lucu doesn't fork\/exec to handle requests like +-- CGI. It just spawns a new thread. Inter-process communication is +-- done with STM. +-- +-- [/Affinity for RESTafarians/] Lucu is a carefully designed +-- web server for RESTful applications. +-- +-- [/SSL connections/] Lucu can handle HTTP connections over SSL +-- layer. +-- +-- Lucu is not a replacement for Apache or lighttpd. It is intended to +-- be used to create an efficient web-based RESTful application +-- without messing around FastCGI. It is also intended to be run +-- behind a reverse-proxy so it doesn't have the following (otherwise +-- essential) facilities: +-- +-- [/Logging/] Lucu doesn't log any requests from any clients. +-- +-- [/Client Filtering/] Lucu always accepts any clients. No IP +-- filter is implemented. +-- +-- [/Bandwidth Limitting/] Lucu doesn't limit bandwidth it consumes. +-- +-- [/Protection Against Wicked Clients/] Lucu is fragile against +-- wicked clients. No attacker should be able to cause a +-- buffer-overflow but can possibly DoS it. +-- - -- Httpd - , runHttpd - -- MIMEType - , MIMEType(..) - , (+/+) - , (+:+) - , (+=+) - - -- Request - , Method(..) - , Request(..) +module Network.HTTP.Lucu + ( -- * Entry Point + runHttpd - -- Resource (driftTo だけは要らないが) - , module Network.HTTP.Lucu.Resource + -- * Configuration + , module Network.HTTP.Lucu.Config - -- Resource.Tree + -- * Resource Tree , ResourceDef(..) + , emptyResource , ResTree , mkResTree - -- Response + -- * Resource Monad + , module Network.HTTP.Lucu.Resource + + -- ** Things to be used in the Resource monad + + -- *** Status Code , StatusCode(..) + + -- *** Abortion + , abort + , abortPurely + , abortA + + -- *** ETag + , ETag(..) + , strongETag + , weakETag + + -- *** MIME Type + , MIMEType(..) + + -- *** Authorization + , AuthChallenge(..) + , AuthCredential(..) - -- StaticFile + -- * Utility + + -- ** Static file handling , module Network.HTTP.Lucu.StaticFile ) where import Network.HTTP.Lucu.Abortion +import Network.HTTP.Lucu.Authorization import Network.HTTP.Lucu.Config import Network.HTTP.Lucu.ETag import Network.HTTP.Lucu.Httpd import Network.HTTP.Lucu.MIMEType -import Network.HTTP.Lucu.Request -import Network.HTTP.Lucu.Resource +import Network.HTTP.Lucu.Resource hiding (driftTo) import Network.HTTP.Lucu.Resource.Tree import Network.HTTP.Lucu.Response import Network.HTTP.Lucu.StaticFile