G      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F GHIJKLGHIJKLMMNNOOportable experimental lemmih@vo.com A MIME media type value.  The P$ instance is derived automatically.  Use Q to obtain the standard  string representation.  See  #http://www.ietf.org/rfc/rfc2046.txt for more ' information about MIME media types. +The top-level media type, the general type $ of the data. Common examples are  "text", "image", "audio", "video",  " multipart", and " application". -The media subtype, the specific data format.  Examples include "plain", "html",  "jpeg", " form-data", etc. ,Media type parameters. On common example is ! the charset parameter for the "text"  top-level type, e.g. ("charset"," ISO-8859-1"). Q>Produce the standard string representation of a content-type,  e.g. "text/html; charset=ISO-8859-1". R5Parse the standard representation of a content-type. 6 If the input cannot be parsed, this function calls  S/ with a (hopefully) informative error message. TRFC 822 LWSP-char U#RFC 822 CRLF (but more permissive) V One line WXYZ[\]^QR_`abcdWXXYZZ[\]^QR_`abcdxbnon-portable experimental lemmih@vo.come!Read a multi-part message from a f. g!Read a multi-part message from a h.  Fails on parse errors. i4Split a multipart message into the multipart parts. j=Drop everything up to and including the first line starting  with the boundary. Returns k if there is no " line starting with a boundary. l+Split a string at the first boundary line. m:Check whether a string starts with two dashes followed by  the given boundary string. n!Check whether a string for which m returns true , has two dashes after the boudary string. o0Checks whether a string starts with two dashes. p4Drop everything up to and including the first CRLF. qESplit a string at the first empty line. The CRLF (if any) before the B empty line is included in the first result. The CRLF after the - empty line is not included in the result.  k( is returned if there is no empty line. r;Split a string at the first CRLF. The CRLF is not included # in any of the returned strings. sLike r%, but if no CRLF is found, the first B result is the argument string, and the second result is empty. t4Get the index and length of the first CRLF, if any. u7Drop an initial CRLF, if any. If the string is empty, < nothing is done. If the string does not start with CRLF, # the first character is dropped. WXYZ[R_`abcvwxyegqrvwwxyyegqrz{|}~{|}~non-portable (not tested) experimentalbjorn@bringert.netAllows stream logging.  Refer to  below. ?Streams should make layering of TLS protocol easier in future,  they allow reading/$writing to files etc for debugging, + they allow use of protocols other than TCP/IP  and they allow customisation. (Instances of this class should not trim - the input in any way, e.g. leave LF on line 3 endings etc. Unless that is exactly the behaviour ) you want from your twisted instances ;) >This is the type returned by many exported network functions. Wraps a stream with logging I/ O, the first 7 argument is a filename which is opened in AppendMode. non-portable (not tested) experimentalbjorn@bringert.netThe 4 object allows input buffering, and maintenance of  some admin-type data. The - newtype is a wrapper that allows us to make ( connections an instance of the StreamIn/%Out classes, without ghc extensions. D While this looks sort of like a generic reference to the transport = layer it is actually TCP specific, which can be seen in the  implementation of the 'Stream Connection' instance. /Open a connection to port 80 on a remote host. 3This function establishes a connection to a remote  host, it uses  getHostByName which interrogates the 5 DNS system, hence may trigger a network connection. Add a  persistant) option? Current persistant is default.  Use Result+ type for synchronous exception reporting? 4Checks both that the underlying Socket is connected 0 and that the connection peer matches the given ( host name (which is recorded locally).  non-portable (not tested) experimentalbjorn@bringert.netAn HTTP Response.  The P: instance of this type is used for message serialisation, B which means no body data is output, additionally the output will D show an HTTP version of 1.1 instead of the actual version returned  by a server. An HTTP Request.  The P: instance of this type is used for message serialisation, % which means no body data is output. might need changing in future  1) to support   uri in OPTIONS request + 2) transparent support for both relative  &% absolute uris, although this should  already work (leave scheme & host parts empty). +The HTTP request method, to be used in the  object. = We are missing a few of the stranger methods, but these are - not really necessary until we add full TLS. DThis class allows us to write generic header manipulation functions  for both  and  data types. HTTP Header Name type: 0 Why include this at all? I have some reasons / 1) prevent spelling errors of header names, 5 2) remind everyone of what headers are available, 4 3) might speed up searches for specific headers. Arguments against: / 1) makes customising header names laborious  2) increases code volume. 1Allows for unrecognised or experimental headers. (The Header data type pairs header names & values. 0Inserts a header with the given name and value.  Allows duplicate header names. 6Adds the new header only if no previous header shares  the same name. )Removes old headers with duplicate name. Inserts multiple headers. )Gets a list of headers with a particular . <Lookup presence of specific HeaderName in a list of Headers 3 Returns the value from the first matching header. ASimple way to get a resource across a non-persistant connection.  Headers that may be altered: > Host Altered only if no Host header is supplied, HTTP/1.1 & requires a Host header. D Connection Where no allowance is made for persistant connections 3 the Connection header will be set to close Like *, but acting on an already opened stream. 2this is not the most graceful of implementations. . The problem is that Network.URI.authority is 6 deprecated. And we want to use Network.URI.URIAuth. So this method use to parse a host field as a URI 0 auth, which is not stictly correct. We still  fake that behavior here. HReceive and parse a HTTP request from the given Stream. Should be used ! for server side interactions. HVery simple function, send a HTTP response over the given stream. This 9 could be improved on to use different transfer types. 4Used when we know exactly how many bytes to expect. 'Used when nothing about data is known, . Unfortunately waiting for a socket closure ' causes bad behaviour. Here we just ( take data once and give up the rest. A necessary feature of HTTP/1.1 , Also the only transfer variety likely to  return any footers. 2Maybe in the future we will have a sensible thing 4 to do here, at that time we might want to change  the name. DRemove leading crlfs then call readTillEmpty2 (not required by RFC) 'Read lines until an empty line (CRLF), - also accepts a connection close as end of  input, which is not an HTTP/1.1 compliant * thing to do - so probably indicates an  error condition. wZ2!DSign a request using the access key and secret key from the S3 data  type. DFill in necessary information (such as a date header) and then sign  then request. 9Return a connection to an S3 server. Will initiate a new ' connection if no previous was found. 9Send a single request to an S3 server returning the body  of the result. Same as $ except that it ignored the result.            4Convenience class for converting data types to URIs *Retrieves the path component from the URI +Retrieves the query component from the URI ,Retrieves the scheme component from the URI EModifies the scheme component of the URI using the provided function CModifies the path component of the URI using the provided function %Sets the scheme component of the URI #Sets the path component of the URI /Render should be used for prettyprinting URIs. 9Parses a URI from a String. Returns Nothing on failure.      - !"#$%&'()*+,-./0123456789:;<=>?@ABCD.% $"!##&'()*+,-./0123456789:;<=>?@ABCD- $"!##!"#$%&'()*+,-./0123456789:;<=>?@ABCDHUses M to transform the given XML  into a  a ". KDPerforms an XSL transformation with lists of ByteStrings instead of  a String. LEquivalent to K4 but does not hide the inherent IO of the low-level  ByteString operations. M:Uses the provided xsl file to transform the given string. A This function creates temporary files during its execution, but  guarantees their cleanup. N.Note that the xsl file must have .xsl suffix. OUse xsltproc to transform XML. PUse saxon to transform XML. EFGHIJKLMNOP NMHKLEOPJIFG EFGHIJKLMNOPQRSTUVWXYZ[\]^_V]\[ZYXW^TU_SQRQRRSTUUV]\[ZYXWWXYZ[\]^_g9Creates a cookie with a default version of 1 and path of / hSet a Cookie in the Result. ? The values are escaped as per RFC 2109, but some browsers may 0 have buggy support for cookies containing e.g. '"' or ' '. i9Not an supported api. Takes a cookie header and returns = either a String error message or an array of parsed cookies j4not a supported api. A parser for RFC 2109 cookies kLGet all cookies from the HTTP request. The cookies are ordered per RFC from I the most specific to the least specific. Multiple cookies with the same  name are allowed to exist. lLGet the most specific cookie with the given name. Fails if there is no such F cookie or if the browser did not escape cookies in a proper fashion. @ Browser support for escaping cookies properly is very diverse. `abcdefghijklmn`abcdefghklmnij`abcdefabcdefghijklmn Result flags =whether a content-length header will be added to the result. Combined headers. HTTP request method HTTP configuration "Port for the server to listen on.  HTTP version ?Should the connection be used for further messages after this.  | isHTTP1_0 && hasKeepAlive || isHTTP1_1 && hasNotConnectionClose HDefault configuration contains no validator and the port is set to 8000 <Default RsFlags that will include the content-length header Don')t display a Content-Lenght field for the Result. DConverts a Request into a String representing the corresponding URL LSets the Response status code to the provided Int and lifts the computation  into a Monad. CTakes a list of (key,val) pairs and converts it into Headers. The % keys will be converted to lowercase .Lookup header value. Key is case-insensitive. ;Lookup header value. Key is a case-insensitive bytestring. JLookup header value with a case-sensitive key. The key must be lowercase. DLookup header with a case-sensitive key. The key must be lowercase. HReturns True if the associated key is found in the Headers. The lookup  is case insensitive. Acts as  with ByteStrings Acts as . but the key is case sensitive. It should be  in lowercase. Associates the key/1value pair in the headers. Forces the key to be  lowercase. Acts as  but with ByteStrings. ISets the key to the HeaderPair. This is the only way to associate a key L with multiple values via the setHeader* functions. Does not force the key _ to be in lowercase or guarantee that the given key and the key in the HeaderPair will match.  Add a key/:value pair to the header. If the key already has a value 8 associated with it, then the value will be appended. ! Forces the key to be lowercase. )Acts as addHeader except for ByteStrings  Add a key/>value pair to the header using the underlying HeaderPair data } type. Does not force the key to be in lowercase or guarantee that the given key and the key in the HeaderPair will match. JCreates a Response with the given Int as the status code and the provided % String as the body of the Response Acts as & but works with ByteStrings directly. Sets the Response'>s status code to the given Int and redirects to the given URI Mopqrstuvwxyz{|}~Mqrstuvwxyz{|}~opHoppq rstuvwxyz{|rstuvwxyz{|}~~Like #& except Strings and Chars not quoted. Decodes multipart/form-data input. (The default content-type for variables. 'Get the path components from a String. $ %Qopqrstuvwxyz{|}~  requires mtl provisional lemmih@vo.com^Minimal definition:   NUsed to convert arbitrary types into an HTTP response. You need to implement  this if you want to pass  ServerPartT m& containing your type into simpleHTTP Useful for withData and getData'( implement this on your preferred type  to use those functions :a wrapper for Read apparently. Pretty much only used for   and probably ! unnecessarily, as it is exactly readM A control structure E It ends the computation and returns the Response you passed into it G immediately. This provides an alternate escape route. In particular : it has a monadic value of any type. And unless you call   id 7 first your response filters will be applied normally. Extremely useful when you'+re deep inside a monad and decide that you C want to return a completely different content type, since it doesn't F force you to convert all your return types to Response early just to  accomodate this. $The basic response building object. C It is worth discussing the unpacked structure of WebT a bit as it' s exposed  in   and  . 7A fully unpacked WebT has a structure that looks like:   M ununWebT $ WebT m a :: m (Maybe (Either Response a, FilterFun Response)) KSo, ignoring m, as it is just the containing Monad, the outermost layer is  a Maybe. This is k if  was called or Just (Either Response  a, SetAppend (Endo Response)) if  wasn't called. Inside the Maybe, J there is a pair. The second element of the pair is our filter function  FilterFun Response. FilterFun Response is a type alias for  SetAppend  (Dual (Endo Response)) . This is just a wrapper for a Response->Response 9 function with a particular Monoid behavior. The value    Append (Dual (Endo f)) 2Causes f to be composed with the previous filter.    Set (Dual (Endo f)) 6Causes f to not be composed with the previous filter. 1Finally, the first element of the pair is either  Left Response or Right a. ZAnother way of looking at all these pieces is from the behaviors they control. The Maybe  controls the mzero behavior.  Set (Endo f)$ comes from the setFilter behavior.  Likewise, Append (Endo f) is from composeFilter.  Left Response is what you  get when you call  finishWith and Right a is the normal exit. &An example case statement looks like:    ex1 webt = do  val <- ununWebT webt  case val of P Nothing -> Nothing -- this is the interior value when mzero was used V Just (Left r, f) -> Just (Left r, f) -- r is the value that was passed into  finishWith K -- f is our filter function R Just (Right a, f) -> Just (Right a, f) -- a is our normal monadic value S -- f is still our filter function   GA set of functions for manipulating filters. A ServerPartT implements C FilterMonad Response so these methods are the fundamental ways of 8 manipulating the response object, especially before you've converted your  monadic value to a ~} Ignores all previous  alterations to your filter As an example:    do  composeFilter f  setFilter g  return " Hello World" 5setFilter g will cause the first composeFilter to be  ignored. 'composes your filter function with the  existing filter function. )retrives the filter from the environment  FilterFun is a lot more fun to type than SetAppend (Dual (Endo a)) A monoid operation container. L If a is a monoid, then SetAppend is a monoid with the following behaviors:    Set x & Append y = Set (x & y)  Append x & Append y = Append (x & y)  _ & Set y = Set y IA simple way of sumerizing this is, if the left side is Append, then the N right is appended to the left. If the left side is Set, then the right side  is ignored. yes, this is exactly like '('( with new names. 5 Why you ask? Because ServerT can lift up a ReaderT. ) If you did that, it would shadow ServerT' s behavior 6 as a ReaderT, thus meaning if you lifted the ReaderT 3 you could no longer modify the Request. This way 3 you can add a ReaderT to your monad stack without  any trouble. IServerPartT is a container for processing requests and returning results 1An alias for using ServerPartT when using the IO  An alias for WebT when using IO :particularly useful when combined with runWebT to produce  a m (Maybe Response) from a request. GUsed to manipulate the containing monad. Very useful when embedding a 7 monad into a ServerPartT, since simpleHTTP requires a ServerPartT IO a.  Refer to  3 for an explanation of the structure of the monad. CHere is an example. Suppose you want to embed an ErrorT into your @ ServerPartT to enable throwError and catchError in your Monad.   9 type MyServerPartT e m a = ServerPartT (ErrorT e m) a ;Now suppose you want to pass MyServerPartT into a function  that demands a ServerPartT IO a (e.g. simpleHTTP). You  can provide the function:   ' unpackErrorT:: (Monad m, Show e) => I -> (ErrorT e m) (Maybe ((Either Response a), FilterFun Response)) > -> m (Maybe ((Either Response a), FilterFun Response))  unpackErrorT handler et = do  eitherV <- runErrorT et  case eitherV of * Left err -> return $ Just (Left Catastrophic failure  ++ show e, Set $ Endo r -> r{rsCode = 500})  Right x -> return x With  unpackErrorT. you can now call simpleHTTP. Just wrap your  ServerPartT list.   = simpleHTTP nullConf $ mapServerPartT unpackErrorT (myPart ` catchError` myHandler) Or alternatively:    simpleHTTP' unpackErrorT nullConf (myPart ` catchError` myHandler)  Also see 1 3 for a more sophisticated version of this function LA varient of mapServerPartT where the first argument, also takes a request. M useful if you want to runServerPartT on a different ServerPartT inside your  monad (see spUnwrapErrorT) deprecated. use mzero ;takes your WebT, converts the monadic value to a Response, 8 applys your filter, and returns it wrapped in a Maybe. <for when you really need to unpack a WebT entirely (and not * just unwrap the first layer with unWebT) for wrapping a WebT back up. mkWebT . ununWebT = id see  # for a discussion of this function An alias for setFilter id  It resets all your filters  Used to ignore all your filters 8 and immediately end the computation. A combination of    and   An alternate form of   that can # be easily used within a do block.  An array of ), useful for processing  command line options into an  for   5parseConfig tries to parse your command line options  into a Conf. =Use the built-in web-server to serve requests according to a  . F Use msum to pick the first handler from a list of handlers that doesn't call  noHandle.  a combination of simpleHTTP and  . See   for a discussion ) of the first argument of this function. Generate a result from a   and a rq. This is mainly used ! by CGI (and fast-cgi) wrappers. flatten turns your arbitrary m a and converts it too  a m ~} with   AThis is kinda like a very oddly shaped mapServerPartT or mapWebT . You probably want one or the other of those.  Get a header out of the request  adds headers into the response. 9 This method does not overwrite any existing header of 5 the same name, hence the name addHeaderM. If you , want to replace a header use setHeaderM. 4sets a header into the response. This will replace ? an existing header of the same name. Use addHeaderM, if you 4 want to add more than one header of the same name. 1guard using an arbitrary function on the request =Guard against the method. This function also guards against > any remaining path segments. See methodOnly for the version  that guards only by method .guard against the method only. (as opposed to  ) FGuard against the method. Note, this function also guards against any  remaining path segments. FGuard against the method. Note, this function also guards against any J remaining path segments. This function id deprecated. You can probably % just use methodSP (or methodM) now. 0Guard against non-empty remaining path segments Pop a path element and run the  ServerPartT! if it matches the given string. QPop a path element and parse it. Annoyingly enough, rather than just using Read 4 (or providing a parser argument), this method uses   which is just a wrapper  for Read. Ggrabs the rest of the URL (dirs + query) and passes it to your handler Kpops any path element and ignores when chosing a ServerPartT to handle the  request. Deprecated. Use  .  Eused to read parse your request with a RqData (a ReaderT, basically) H For example here is a simple GET or POST variable based authentication K guard. It handles the request with errorHandler if authentication fails.   myRqData = do  username < - lookInput "username"  password < - lookInput "password" " return (username, password)  checkAuth errorHandler = do  d <- getData myRqDataA  case d of " Nothing -> errorHandler & Just a | isValid a -> mzero - Just a | otherwise -> errorHandler  7An varient of getData that uses FromData to chose your # RqData for you. The example from   becomes:   myRqData = do  username < - lookInput "username"  password < - lookInput "password" " return (username, password) + instance FromData (String,String) where  fromData = myRqData  checkAuth errorHandler = do  d < - getData'  case d of " Nothing -> errorHandler & Just a | isValid a -> mzero - Just a | otherwise -> errorHandler  3Retrieve data from the input query or the cookies.  =withDataFn is like with data, but you pass in a RqData monad  for reading.  &proxyServe is for creating ServerPartT's that proxy.  The sole argument [String]" is a list of allowed domains for 8 proxying. This matches the domain part of the request & and the wildcard * can be used. E.g.  "*" to match anything.  " *.example.com"% to match anything under example.com  " example.com" to match just example.com ATODO: annoyingly enough, this method eventually calls escape, so  any headers you set won'0t be used, and the computation immediatly ends. @Takes a proxy Request and creates a Response. Your basic proxy  building block. See   *TODO: this would be more useful if it didn't call escape (e.g. it let you < modify the response afterwards, or set additional headers) (This is a reverse proxy implementation.  see   *TODO: this would be more useful if it didn't call escape , just like  proxyServe' $Run an IO action and, if it returns Just", pass it to the second argument. <A varient of require that can run in any monad, not just IO Use cmd to transform XML against xslPath. 2 This function only acts if the content-type is  application/xml. deprecated. Same as   &sets the return code in your response /adds the cookie with a timeout to the response 6adds the list of cookie timeout pairs to the response -same as setResponseCode status >> return val  Respond with 200 OK.  Respond with 400 Bad Request.  Respond with 401 Unauthorized.  Respond with  403 Forbidden.  Respond with  404 Not Found.  Respond with  303 See Other.  Respond with  302 Found.   Respond with 301 Moved Permanently. ! Respond with 307 Temporary Redirect. "deprecated. Just use msum #!what is this for, exactly? I don't understand why Show a is even in the context $ This appears to do nothing at all. $,a constructor for a ServerPartT when you don't care about the request %again, why is this useful? &)a simple HTTP basic authentication guard 'HUseful inside the RqData monad. Gets the named input parameter (either  from a POST or a GET) (5Gets the named input parameter as a lazy byte string )!Gets the named input as a String *Gets the named cookie % the cookie name is case insensitive +"gets the named cookie as a string ,1gets the named cookie as the requested Read type -like look, but Reads for you. .=gets all the input parameters, and converts them to a string /QThis ServerPart modifier enables the use of throwError and catchError inside the F WebT actions, by adding the ErrorT monad transformer to the stack. -You can wrap the complete second argument to   in this function. 0)An example error Handler to be used with spUnWrapErrorT, which returns the 9 error message as a plain text message to the browser. KAnother possibility is to store the error message, e.g. as a FlashMsg, and % then redirect the user somewhere. 1%This is a for use with mapServerPartT' It it unwraps 5 the interior monad for use with simpleHTTP. If you 6 have a ServerPartT (ErrorT e m) a, this will convert / that monad into a ServerPartT m a. Used with  mapServerPartT'0 to allow throwError and catchError inside your  monad. Eg.   # simpleHTTP conf $ mapServerPartT'( (spUnWrapErrorT failurePart) $ myPart ` catchError` errorPart  Note that  failurePart. will only be run if errorPart threw an error  so it doesn't have to be very complex. 2;Set the validator which should be used for this particular ~}  when validation is enabled. CCalling this function does not enable validation. That can only be ( done by enabling the validation in the  that is passed to   . >You do not need to call this function if the validator set in   does what you want already. Example: (use 7 $ instead of the default supplied by 4 )   J simpleHTTP validateConf . anyRequest $ ok . setValidator noopValidator =<< htmlPage  See also: 4 , 6 , 7 , 8  3ServerPart version of 2  Example: (Set validator to 7 )   ? simpleHTTP validateConf $ setValidatorSP noopValidator (dir ajax ... )  See also: 2  4 This extends $ by enabling validation and setting  6  as the default validator for text/html.  Example:  5 simpleHTTP validateConf . anyRequest $ ok htmlPage 5%Actually perform the validation on a ~} #Run the validator specified in the ~}. If none is provide $ use the supplied default instead. =Note: This function will run validation unconditionally. You  probably want 2  or 4 . 6 Validate text/html content with WDG HTML Validator. 1This function expects the executable to be named validate  and it must be in the default PATH.  See also: 2 , 4 , 8  7#A validator which always succeeds. AUseful for selectively disabling validation. For example, if you @ are sending down HTML fragments to an AJAX application and the 8 default validator only understands complete documents. 8 Validate the ~} using an external application. @If the external application returns 0, the original response is F returned unmodified. If the external application returns non-zero, a ~} = containing the error messages and original response body is  returned instead. DThis function also takes a predicate filter which is applied to the B content-type of the response. The filter will only be applied if  the predicate returns true. ENOTE: This function requirse the use of -threaded to avoid blocking. 7 However, you probably need that for Happstack anyway.  See also: 6  `abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./012345678p$" !    & #%'()*+,-./012345678p      !"#$%&'()*+,-./012345678 4Serve files with a mime type map under a directory. 5 Uses the function to transform URIs to FilePaths. ='Ready collection of common mime types. >Prevents files of the form '.foo' or  'bar/.foo' from being served ?JReturns True if the given String either starts with a . or is of the form  foo/.bar5, e.g. the typical *nix convention for hidden files. 9:;<=>?9<=?>;:9:;<=>? @ Is equal to  haskell/Main A Is equal to  public/log BConvenience function around :  ) with the default binary location set to @  and the  log location set to A . @AB@AB@AB C reads the "Accept-Encoding" header. Then, if possible . will compress the response body with methods gzip or deflate &Returns the name of the coding chosen D/compresses the body of the response with gzip.  does not set any headers. E-compresses the body of the response with zlib's  deflate method  does not set any headers.  1based on the rules describe in rfc2616 sec. 14.3 F6unsupported: a parser for the Accept-Encoding header CDEFCDEFCDEF*EFGHIJKLMNOP`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@AB!++,-./01233456789:;<=>?@AABCDEEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$$$ %                                 =                 5  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ `abcdefghijklmnopqrssttuvwxyz{|}~uu  ! ! ! !!!!!!!!!!!!!!!n !&"'(#'(# $)% & ' ( ) *+happstack-server-0.2.1Happstack.Server.HTTP.TypesHappstack.Server.SURIHappstack.Server.MinHaXMLHappstack.Server.XSLTHappstack.Server.JSONHappstack.Server.CookieHappstack.Server.MessageWrapHappstack.Server.HTTP.LowLevelHappstack.Server.HTTP.ClientHappstack.Server.SimpleHTTPHappstack.Server.HTTP.FileServeHappstack.Server.StdConfigHappstack.Server.PartsPaths_happstack_serverHappstack.Server.SURI.ParseURIHappstack.Server.HTTP.SocketTHHappstack.Server.HTTP.Socket#Happstack.Server.HTTP.RFC822Headersbase Text.Show Control.MonadHappstack.Server.HTTP.Multipartbytestring-0.9.1.4Data.ByteString.Lazy.Internal System.IO Data.MaybeHappstack.Server.HTTP.LazyLinerHappstack.Server.HTTP.Clock"Happstack.Server.HTTPClient.StreamHappstack.Server.HTTPClient.TCP Happstack.Server.HTTPClient.HTTPPreludeHappstack.Server.S3 Data.Char Text.ReadHappstack.Server.HTTP.HandlerHappstack.Server.HTTP.Listen Data.Monoid mtl-1.1.0.2Control.Monad.ReaderSystem.Console.GetOptHappstack.Server ContentTypectType ctSubtype ctParametersFromPathfromPathToSURItoSURISURIsuripathqueryschemeu_schemeu_patha_schemea_pathunEscapeescapeisAbsrenderparseElStringelString ToElement toElementXMLElement StyleSheetXSLCSSstyleURLNoStyleStyleURL hasStyleURLisCSSisXSLtlexmlElemtextElem emptyElemlistElem cdataElem simpleDocOld simpleDoc simpleDoc' xmlEscaper xmlStdEscapeverbim simpleProlognonEmptygetRootwrapElemelFattrFattrFSattrFMbquoteEscrecToEllistToEltoAttrsXSLPath XSLTCommandXSLTCmdxsltElem procLBSIO procFPSIOxsltFPS xsltFPSIO xsltStringxsltFilexsltprocsaxonJSONCallJCallCallBackToJSONtoJSONJSONJNullJListJObjJFloatJIntJStringJBooljInt jsonToStringCookie cookieVersion cookiePath cookieDomain cookieName cookieValuemkCookiemkCookieHeader parseCookies cookiesParser getCookies getCookie getCookies' getCookie'RqBodyBodyRequestrqMethodrqPathsrqUrirqQueryrqInputs rqCookies rqVersion rqHeadersrqBodyrqPeerResponsersCode rsHeadersrsFlagsrsBody rsValidatorHostInput inputValue inputFilenameinputContentTypeRsFlagsrsfContentLengthHeaders HeaderPairhNamehValueMethodCONNECTOPTIONSTRACEDELETEPUTPOSTHEADGETConfport validatorVersion continueHTTPnullConf nullRsFlagsnoContentLengthrqURL setRsCode mkHeaders getHeader getHeaderBSgetHeaderUnsafe hasHeader hasHeaderBShasHeaderUnsafe setHeader setHeaderBSsetHeaderUnsafe addHeader addHeaderBSaddHeaderUnsaferesultresultBSredirect ReadString readString queryInput bodyInput formDecode decodeBodymultipartDecodebodyPartToInput simpleInputdefaultInputTypepathElsrequest parseResponse putRequest getResponse unproxify unrproxifylisten ToMessage toContentType toMessage toResponseFromDatafromDataRqData FromReqURI fromReqURIWebMonad finishWithWebTunWebT FilterMonad setFilter composeFilter getFilterFilterT unFilterT FilterFun SetAppendAppendSet ServerMonadaskRqlocalRq ServerPartT unServerPartT ServerPartWebrunServerPartT withRequestmapServerPartTmapServerPartT'noHandlerunWebTununWebTmkWebTmapWebT ignoreFiltersescape' parseConfig simpleHTTP simpleHTTP'flatten localContext getHeaderM addHeaderM setHeaderMguardRqmethodM methodOnlymethodSPmethodnullDirdiruriRestanyPathanyPath' getDataFngetDatawithData withDataFn proxyServe rproxyServerequirerequireMxsltdoXsltmodifyResponsesetResponseCode addCookie addCookiesokinternalServerError badGateway badRequest unauthorized forbiddennotFoundseeOtherfoundmovedPermanently tempRedirectmulti debugFilter anyRequest applyRequest basicAuth lookInputlookBSlook lookCookielookCookieValuereadCookieValuelookRead lookPairserrorHandlerSPsimpleErrorHandlerspUnwrapErrorT setValidatorsetValidatorSP validateConf runValidatorwdgHTMLValidator noopValidatorlazyProcValidatorMimeMap errorwrapperdoIndex fileServe mimeTypes blockDotFilesisDotbinarylocation loglocationerrWrapcompressedResponseFilter gzipFilter deflateFilter encodingsversion getBinDir getLibDir getDataDir getLibexecDirgetDataFileName parseURIRef supportsIPv6 acceptLiteGHC.ShowShowshowContentTypeparseContentTypeGHC.Basefailws1crLf lineStringContentDispositionContentTransferEncodingHeaderpHeaders parseHeaderspHeadergetContentTypeparseContentTransferEncodinggetContentTransferEncodingparseContentDispositiongetContentDispositionparseMparseMultipartBody ByteStringhGetMultipartBody GHC.IOBaseHandle splitParts dropPreambleNothingsplitAtBoundary isBoundaryisClosestartsWithDashesdropLinesplitAtEmptyLine splitAtCRLF splitAtCRLF_findCRLFdropCRLFBodyPart MultiPartData.ByteString.LazytoChunksLazynewLinerHandle headerLinesgetBytesStrictgetBytesgetRestgetApproximateTimeDebug debugStreamStreamResultreadLine readBlock writeBlockclose ConnError ErrorMisc ErrorParse ErrorClosed ErrorResetbindEhandleSocketErrormyrecvConn ConnectionopenTCP openTCPPort isConnectedTo ConnClosedMkConnconnSockconnAddrconnBffrconnHostConnRefgetRefrqURIGHC.Num* RequestMethod HasHeaders HeaderName HdrCustom insertHeadersretrieveHeaders findHeader simpleHTTP_getAuth receiveHTTP respondHTTPlinearTransferhopefulTransferchunkedTransferuglyDeathTransferreadTillEmpty1readTillEmpty2rspCode rspReason rspHeadersrspBodyHdrContentTransferEncodingHdrLastModified HdrExpiresHdrETagHdrContentTypeHdrContentRange HdrContentMD5HdrContentLocationHdrContentLengthHdrContentLanguageHdrContentEncodingHdrContentBaseHdrAllowHdrWWWAuthenticate HdrWarningHdrVary HdrSetCookie HdrServer HdrRetryAfter HdrPublicHdrProxyAuthenticate HdrLocationHdrAge HdrUserAgent HdrRefererHdrRangeHdrProxyAuthorizationHdrMaxForwardsHdrIfUnmodifiedSince HdrIfRangeHdrIfNoneMatch HdrIfMatchHdrIfModifiedSinceHdrHostHdrFrom HdrExpect HdrCookieHdrAuthorizationHdrAcceptLanguageHdrAcceptEncodingHdrAcceptCharset HdrAcceptHdrVia HdrUpgradeHdrTransferEncoding HdrPragmaHdrDate HdrConnectionHdrCacheControl insertHeaderinsertHeaderIfMissing replaceHeader httpVersionsendHTTPsendHTTPPipelined urlDecode urlEncode urlEncodeVars signRequest signRequest' getConnection sendRequest sendRequest_ SecretKey AccessKeyObjectIdBucketIdnewS3closeS3 createBucket createObject getObject deleteBucket deleteObject listObjects amazonURIStringgetHeaderUnsafe'GHC.ReadReadmzeromappendReaderThoOptDescr simpleHTTP'' proxyServe'resp fileServe' bestEncoding