Îõ³h$%@#w×      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVNone#$"Ã"4happstack-liteconfiguration to be used with ; function6happstack-liteport to listen on7happstack-lite&maximum amount of POST data (in bytes)8happstack-lite#maximum file upload size (in bytes)9happstack-lite$temporary directory for file uploads:happstack-litea reasonable default 4 šServerConfig { port = 8000 , ramQuota = 1 * 10^6 , diskQuota = 20 * 10^6 , tmpDir = "/tmp/" };happstack-lite8start the server and handle requests using the supplied <happstack-liteÐPop a path element and run the supplied handler if it matches the given string. Ëhandler :: ServerPart Response handler = dir "foo" $ dir "bar" $ subHandler/The path element can not contain '/'. See also dirs.=happstack-lite*Pop a path element and parse it using the  fromReqURI in the  class.>happstack-liteÁguard which only succeeds if there are no remaining path segments8Often used if you want to explicitly assign a route for W?happstack-lite)Guard using an arbitrary function on the .@happstack-lite Guard against the request methodExample: Íhandler :: ServerPart Response handler = do method [GET, HEAD] ...Ahappstack-lite A low-level function to build a  from a content-type and a X. Creates a  in a manner similar to the 7 class, but without requiring an instance declaration.example: ¶import Data.ByteString.Char8 as C import Data.ByteString.Lazy.Char8 as L import Happstack.Lite main = serve Nothing $ ok $ toResponseBS (C.pack "text/plain") (L.pack "hello, world")(note:  and À only work for ascii. For unicode strings you would need to use  utf8-string, text), or something similar to create a valid X).Bhappstack-lite Respond with 200 OK. ,main = serve Nothing $ ok "Everything is OK"Chappstack-lite Respond with 500 Internal Server Error. ×main = serve Nothing $ internalServerError "Sorry, there was an internal server error."Dhappstack-lite Respond with 401 Unauthorized. =main = serve Nothing $ unauthorized "You are not authorized."Ehappstack-lite Respond with  404 Not Found. Îmain = serve Nothing $ notFound "What you are looking for has not been found."Fhappstack-lite.Set an arbitrary return code in your response.×A filter for setting the response code. Generally you will use a helper function like B or G. ámain = serve Nothing $ do setResponseCode 200 return "Everything is OK"Ghappstack-lite Respond with  303 See Other. îmain = serve Nothing $ seeOther "http://example.org/" "What you are looking for is now at http://example.org/"NOTE: The second argument of GÔ is the message body which will sent to the browser. According to the HTTP 1.1 spec, äthe entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).ìThis is because pre-HTTP/1.1 user agents do not support 303. However, in practice you can probably just use "" as the second argument.Hhappstack-lite8Gets the first matching named input parameter as a lazy X7Searches the QUERY_STRING followed by the Request body. see also: IIhappstack-lite7Gets all matches for the named input parameter as lazy Xs7Searches the QUERY_STRING followed by the Request body. see also: HJhappstack-lite8Gets the first matching named input parameter as a lazy Y7Searches the QUERY_STRING followed by the Request body.>This function assumes the underlying octets are UTF-8 encoded. see also: KKhappstack-lite7Gets all matches for the named input parameter as lazy Ys7Searches the QUERY_STRING followed by the Request body.>This function assumes the underlying octets are UTF-8 encoded. see also: JLhappstack-lite"Gets the first matching named fileêFiles can only appear in the request body. Additionally, the form must set enctype="multipart/form-data".,This function returns a tuple consisting of: +The temporary location of the uploaded file*The local filename supplied by the browser(The content-type supplied by the browserÅNOTE: You must move the file from the temporary location before the à is sent. The temporary files are automatically removed after the  is sent.Mhappstack-lite!gets the named cookie as a stringNhappstack-lite Add the list . to the .Ohappstack-liteÀExpire the named cookie immediately and set the cookie value to "" Ømain = serve Nothing $ do expireCookie "name" ok $ "The cookie has been expired."Phappstack-lite Get a header out of the request.Qhappstack-liteõAdd headers into the response. This method does not overwrite any existing header of the same name, hence the name Q'. If you want to replace a header use R.Rhappstack-liteÞSet a header into the response. This will replace an existing header of the same name. Use Q; if you want to add more than one header of the same name.Shappstack-liteÊServe files and directories from a directory and its subdirectories using sendFile.Usage: ÄserveDirectory EnableBrowsing ["index.html"] "path/to/files/on/disk"ÌIf the requested path does not match a file or directory on the disk, then S calls .ÁIf the requested path is a file then the file is served normally.óIf the requested path is a directory, then the result depends on what the first two arguments to the function are.ÃThe first argument controls whether directory browsing is enabled.ÃThe second argument is a list of index files (such as index.html).When a directory is requested, S„ will first try to find one of the index files (in the order they are listed). If that fails, it will show a directory listing if EnableBrowsing# is set, otherwise it will return %forbidden "Directory index forbidden".àHere is an explicit list of all the possible outcomes when the argument is a (valid) directory: DisableBrowsing, empty index file list>This will always return, forbidden "Directory index forbidden" DisableBrowsing, non-empty index file list +If an index file is found it will be shown.8Otherwise returns, forbidden "Directory index forbidden" EnableBrowsing, empty index file listAlways shows a directory index. EnableBrowsing, non-empty index file list *If an index file is found it will be shown!Otherwise shows a directory index see also: TThappstack-liteƒServe a single, specified file. The name of the file being served is specified explicity. It is not derived automatically from the  url. example 1:!Serve as a specific content-type: try to guess the content-type of a file based on its extension=defaults to "application/octet-stream" if no match was found.Useful as an argument to T see also: T, ;happstack-liteif Nothing, then use :happstack-literequest handlerAhappstack-lite content-typehappstack-lite response bodyFhappstack-lite response codeLhappstack-lite!name of input field to search forhappstack-lite;(temporary file location, uploaded file name, content-type)Shappstack-liteallow directory browsinghappstack-lite;index file names, in case the requested path is a directoryhappstack-litefile/directory to serveThappstack-lite9function for determining content-type of file. Typically Uhappstack-litepath to the file to serveUhappstack-litethe content-type to returnVhappstack-lite0map from file extensions to mime-types (usually )×  #"! $.-,+*)('&%3210/456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV×456789:;@ <=>? ABCDEGFHIJKL#"! .-,+*)('&%3210/$NOMQRPSTUVÛ                  ! " # $ % & ' ( ) * + , -. -/ -0 -1 -1 23 24 25 26 27 28 29 2: 2; 2< 2< 2= 2> 2? 2@ 2ABBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmî+happstack-lite-7.3.8-LctHVWZYLArA4oYLaaC2vhHappstack.LiteCpackLbase Data.FoldablemsumGHC.Basemplusmzero MonadPlus-happstack-server-7.7.2-KecenqRi9639gkuHo4d3Cz)Happstack.Server.FileServe.BuildingBlocks mimeTypesMimeMapDisableBrowsingEnableBrowsingBrowsingHappstack.Server.Routing matchMethod MatchMethodHappstack.Server.Response toResponse toMessage toContentType ToMessage Happstack.Server.Internal.Monads ServerPartHappstack.Server.Internal.Types EXTENSIONPATCHCONNECTOPTIONSTRACEDELETEPUTPOSTHEADGETMethodResponseRequest fromReqURI FromReqURI'Happstack.Server.Internal.RFC822Headers ctParameters ctSubtypectType ContentType Happstack.Server.Internal.CookiemkCookiesameSitehttpOnlysecure cookieValue cookieName cookieDomain cookiePath cookieVersionCookieExpiredExpiresMaxAgeSession CookieLife ServerConfigportramQuota diskQuotatmpDirdefaultServerConfigservedirpathnullDirguardRqmethod toResponseBSokinternalServerError unauthorizednotFoundsetResponseCodeseeOtherlookBSlookBSslookText lookTextslookFilelookCookieValue addCookies expireCookie getHeaderM addHeaderM setHeaderMserveDirectory serveFile asContentTypeguessContentTypeMGHC.Real/bytestring-0.10.10.0Data.ByteString.Lazy.Internal ByteString text-1.2.3.2Data.Text.Internal.LazyTextGHC.IOFilePath