"      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ ` 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 { | } ~                      None+?Monadic analog to Read that uses ByteString instead of String. Fails if the input wasn't parsed completely. +,+,+,+,Noneneedle  needle start needle end (inclusive)  haystack haystack start haystack end (inclusive) unknown experimentalbos@serpentine.comNoneBThe lower bound on the size of a lookup table. We choose this to , balance table density against performance. Create a set. Check the set for membership. ACheck the set for membership. Only works with 8-bit characters: : characters above code point 255 will give wrong answers.  None-./0-./0-./0-./0None123456789:;< 123456789:;< 123456789:;< 123456789:;<None &Get the length of a bytestring Stream AEnumerates a Builder. B Enumerates a strict bytestring. CEnumerates a lazy bytestring. E Wraps an /, counting the number of bytes consumed by it. F#Creates a buffer to be passed into H. GBuffers an iteratee, "unsafely"$. Here we use a fixed binary buffer  which we'@ll re-use, meaning that if you hold on to any of the bytestring 0 data passed into your iteratee (instead of, let's say, shoving it right out  a socket) it'=ll get changed out from underneath you, breaking referential ! transparency. Use with caution! HBuffers an iteratee, "unsafely"$. Here we use a fixed binary buffer  which we'@ll re-use, meaning that if you hold on to any of the bytestring 0 data passed into your iteratee (instead of, let's say, shoving it right out  a socket) it'=ll get changed out from underneath you, breaking referential ! transparency. Use with caution! )This version accepts a buffer created by F. I6Skip n elements of the stream, if there are that many J6Skip n elements of the stream, if there are that many LIReads n bytes from a stream and applies the given iteratee to the stream I of the read elements. Reads exactly n bytes, and if the stream is short  propagates an error. /=>?@ABCDEFGHIJKLMNOPQRSTUVaction to bump timeout  minimum data rate, in bytes per  second minimum amount of time to let  the iteratee run for iteratee consumer to wrap E  !"#$%&'()*=>?@ABCDEFGHIJKLMNOPQRSTUVEBCANO=UEJFHGKILMDPQRSTV>@?" !&#$%(')*    +=>?@ABCDEFGHIJKLMNOPQRSTUVNoneWXYZWXYZXZYWWXYZNoneG[Represents an HTTP response. `?We will need to inspect the content length no matter what, and  looking up "content-length"' in the headers and parsing the number * out of the text will be too expensive. bReturns the HTTP status code. c,Returns the HTTP status explanation string. d3If true, we are transforming the request body with  transformRequestBody eEControls whether Snap will buffer the output or not. You may wish to F disable buffering when using Comet-like techniques which rely on the C immediate sending of output data in order to maintain interactive  semantics. g4output body is sendfile(), optional second argument  is a byte range to send houtput body is a  enumerator i@Contains all of the information about an incoming HTTP request. k>The server name of the request, as it came in from the request's  Host: header. l9Returns the port number the HTTP server is listening on. mThe remote IP address. nThe remote TCP port number. o'The local IP address for this request. p9Returns the port number the HTTP server is listening on. qReturns the HTTP server's idea of its local hostname. rReturns True if this is an HTTPS session. u Returns the Content-Length of the HTTP request body. v!Returns the HTTP request method. w-Returns the HTTP version used by the client. xAReturns a list of the cookies that came in from the HTTP request  headers. yHandlers can be hung on a URI " entry point"; this is called the  " context path"+. If a handler is hung on the context path  "/foo/", and you request "/foo/bar", the value of  y will be "bar". The following identity holds: ' rqURI r == S.concat [ rqContextPath r $ , rqPathInfo r / , let q = rqQueryString r & in if S.null q $ then "" 0 else S.append "?" q  ] zThe " context path" of the request; catenating z,  and y% should get you back to the original {  (ignoring query strings). The z always begins and ends  with a slash ("/"/) character, and represents the path (relative  to your component/*snaplet) you took to get to your handler. { Returns the URI requested by the client. |'Returns the HTTP query string for this i. }(Returns the parameters mapping for this i. " Parameters" ' are automatically decoded from the URI's query string and POST body $ and entered into this mapping. The } value is thus a union of  ~ and . ~*The parameter mapping decoded from the URI's query string. AThe parameter mapping decoded from the POST body. Note that Snap 7 only auto-decodes POST request bodies when the request's   Content-Type is  application/x-www-form-urlencoded.  For  multipart/ form-data use   3 to decode the POST request and fill this mapping. An existential wrapper for the 'Enumerator ByteString IO a' type =A type alias for the HTTP parameters mapping. Each parameter F key maps to a list of ByteString values; if a parameter is specified  multiple times (e.g.: "GET /foo?param=bar1& param=bar2"), looking up  "param" in the mapping will give you ["bar1", "bar2"]. (A datatype representing an HTTP cookie. The name of the cookie.  The cookie's string value.  The cookie'#s expiration value, if it has one.  The cookie's "domain" value, if it has one. The cookie path. Tag as secure cookie?  HttpOnly? 'Enumerates the HTTP method values (see   5http://tools.ietf.org/html/rfc2068.html#section-5.1.1). 6A typeclass for datatypes which contain HTTP headers. Modify the datatype' s headers. 7Retrieve the headers from a datatype that has headers. $Adds a header key-value-pair to the  datatype. If a header M with the same name already exists, the new value is appended to the headers  list. "Sets a header key-value-pair in a  datatype. If a header with E the same name already exists, it is overwritten with the new value. +Gets all of the values for a given header. Gets a header value out of a  datatype. If many headers came 9 in with the same name, they will be catenated together. Lists all the headers out of a  datatype. If many F headers came in with the same name, they will be catenated together. Clears a header value from a  datatype. JLooks up the value(s) for the given named parameter. Parameters initially  come from the request'1s query string and any decoded POST body (if the  request's  Content-Type is  application/x-www-form-urlencoded). 8 Parameter values can be modified within handlers using rqModifyParams. KLooks up the value(s) for the given named parameter in the POST parameters  mapping. ALooks up the value(s) for the given named parameter in the query  parameters mapping. ,Modifies the parameters mapping (which is a Map ByteString ByteString)  in a i using the given function. CWrites a key-value pair to the parameters mapping within the given  request.  An empty [. (Sets an HTTP response body to the given ) value. <Sets the HTTP response status. Note: normally you would use  2 unless you needed a custom response explanation. Sets the HTTP response code. Modifies a response body.  Sets the  Content-Type in the [ headers.  Adds an HTTP  to [ headers.  Gets an HTTP  with the given name from [ headers. Returns a list of  s present in [ Deletes an HTTP  from the [ headers. Please note E this does not necessarily erase the cookie from the client browser. Modifies an HTTP  with given name in [ headers. # Nothing will happen if a matching  can not be found in [. $A note here: if you want to set the Content-Length for the response, J Snap forces you to do it with this function rather than by setting it in  the headers; the Content-Length! in the headers will be ignored. ?The reason for this is that Snap needs to look up the value of  Content-Length: for each request, and looking the string value up in the G headers and parsing the number out of the text will be too expensive.  If you don'At set a content length in your response, HTTP keep-alive will be  disabled for HTTP/1.0 clients, forcing a Connection: close. For  HTTP/B1.1 clients, Snap will switch to the chunked transfer encoding if  Content-Length is not specified.  Removes any Content-Length set in the [. HThe buffering mode controls whether Snap will buffer the output or not. J You may wish to disable buffering when using Comet-like techniques which C rely on the immediate sending of output data in order to maintain  interactive semantics. HThe buffering mode controls whether Snap will buffer the output or not. J You may wish to disable buffering when using Comet-like techniques which C rely on the immediate sending of output data in order to maintain  interactive semantics.  Converts a  into common log entry format.  Converts a  into an HTTP timestamp. "Converts an HTTP timestamp into a . l[\]^_`abcdefghijklmnopqrstuvwxyz{|}~parameter name to look up  HTTP request parameter name to look up  HTTP request parameter name to look up  HTTP request parameter name parameter values request new response body enumerator response to modify HTTP response integer code HTTP response explanation Response to be modified HTTP response integer code Response to be modified  cookie value response to modify  cookie name response to query response to query  cookie name response to modify  cookie name modifier function response to modify +if True, buffer the output, if False, send  output immediately f[\]^_`abcdefghijklmnopqrstuvwxyz{|}~fijklmnopqrstuvwxyz{|}~fhg[\]^_`abcde5[ \]^_`abcdefhgijklmnopqrstuvwxyz{|}~ None 1Parsers for different tokens in an HTTP request. 1Parsers for different tokens in an HTTP request. 1Parsers for different tokens in an HTTP request.  Parser for zero or more spaces. Parser for request headers. #Decodes an URL-escaped string (see   3http://tools.ietf.org/html/rfc2396.html#section-2.4) URL-escapes a string (see   3http://tools.ietf.org/html/rfc2396.html#section-2.4) URL-escapes a string (see   3http://tools.ietf.org/html/rfc2396.html#section-2.4 ) into a . Parses a string encoded in  application/x-www-form-urlencoded format. ++++NoneFGiven a Response, asserts that its HTTP status code is 200 (success). HGiven a Response, asserts that its HTTP status code is 404 (Not Found). GGiven a Response, asserts that its HTTP status code is between 300 and J 399 (a redirect), and that the Location header of the Response points to  the specified URI. GGiven a Response, asserts that its HTTP status code is between 300 and  399 (a redirect). BGiven a Response, asserts that its body matches the given regular  expression. %The Response should redirect to this  URI (Regexp that will match the body content  NoneGThis exception is thrown if the handler chooses to escape regular HTTP  traffic. ?An exception hierarchy for exceptions that cannot be caught by  user-defined error handlers timeout modifier socket write end  None=6This exception is thrown if the handler you supply to ( fails.  is the  that user web handlers run in.  gives you:  , stateful access to fetch or modify an HTTP i , stateful access to fetch or modify an HTTP [  failure /  /  semantics: a  handler can / choose not to handle a given request, using  or its synonym , 1 and you can try alternative handlers with the  operator:   a :: Snap String  a = pass   b :: Snap String  b = return "foo"   c :: Snap String B c = a <|> b -- try running a, if it fails then try b   convenience functions (, , , ,  +) for queueing output to be written to the [:  + a :: (forall a . Enumerator a) -> Snap ()  a someEnumerator = do ' writeBS "I'm a strict bytestring" & writeLBS "I'm a lazy bytestring" ! writeText "I'm strict text"  addToOutput someEnumerator   early termination: if you call :   a :: Snap ()  a = do B modifyResponse $ setResponseStatus 500 "Internal Server Error"  writeBS "500 error"  r <- getResponse  finishWith r <then any subsequent processing will be skipped and supplied [  value will be returned from ( as-is.   access to the  monad through a  instance:   a :: Snap ()  a = liftIO fireTheMissiles  K the ability to set or extend a timeout which will kill the handler thread  after N4 seconds of inactivity (the default is 20 seconds):   a :: Snap ()  a = setTimeout 30  $ throw and catch exceptions using a  instance:   foo :: Snap () . foo = bar `catch` \(e::SomeException) -> baz  where  bar = throw FooException  ! log a message to the error log:   foo :: Snap ()  foo = logError "grumble." IYou may notice that most of the type signatures in this module contain a (MonadSnap m) => ... typeclass constraint.  is a typeclass which, in essence, says "you can get back to the  monad from here". Using  you can extend the ) monad with additional functionality and !still have access to most of the  functions without writing  Heverywhere. Instances are already provided for most of the common monad transformers (ReaderT, WriterT,  , etc.).  is a type class, analogous to  for  , that makes  it easy to wrap  inside monad transformers. GThe Typeable instance is here so Snap can be dynamically executed with  Hint. ?Sends the request body through an iteratee (data consumer) and  returns the result. KIf the iteratee you pass in here throws an exception, Snap will attempt to L clear the rest of the unread request body before rethrowing the exception.  If your iteratee used &!, however, Snap will give up and  immediately close the socket. /Returns the request body as a lazy bytestring. JThis function is deprecated as of 0.6; it places no limits on the size of ? the request being read, and as such, if used, can result in a 5 denial-of-service attack on your server. Please use   instead. /Returns the request body as a lazy bytestring.  New in 0.6. BNormally Snap is careful to ensure that the request body is fully 6 consumed after your web handler runs, but before the [ enumerator L is streamed out the socket. If you want to transform the request body into : some output in O(1) space, you should use this function. LNote that upon calling this function, response processing finishes early as  if you called 0. Make sure you set any content types, headers, . cookies, etc. before you call this function. Short-circuits a ' monad action early, storing the given  [ value in its state. 4Capture the flow of control in case a handler calls . WARNING: in the event of a call to  it is possible G to violate HTTP protocol safety when using this function. If you call  8 it is suggested that you do not modify the body of the  [ which was passed to the  call. Fails out of a ) monad action. This is used to indicate B that you choose not to handle the given request within the given  handler. Runs a ! monad action only if the request's HTTP method matches  the given method. Runs a ! monad action only if the request's HTTP method matches  one of the given methods.  Runs a  monad action only when the y of the request * starts with the given path. For example,   dir "foo" handler  Will fail if y is not "/foo" or "/foo/..." , and will  add "foo/" to the handler's local z.  Runs a & monad action only for requests where y is F exactly equal to the given string. If the path matches, locally sets  z to the old value of y, sets y="",  and runs the given handler.  Runs a 4 monad action only when the first path component is G successfully parsed as the argument to the supplied handler function.  Runs a  monad action only when y is empty. Local Snap version of . Local Snap monad version of .   Grabs the i object out of the  monad. Grabs something out of the i$ object, using the given projection  function. See .  Grabs the [ object out of the  monad. Grabs something out of the [$ object, using the given projection  function. See .  Puts a new [ object into the  monad.  Puts a new i object into the  monad.  Modifies the i object stored in a  monad.  Modifes the [ object stored in a  monad. #Performs a redirect by setting the Location header to the given target  URL/'path and the status code to 302 in the [ object stored in a  > monad. Note that the target URL is not validated in any way.  Consider using  'redirect\''1 instead, which allows you to choose the correct  status code. #Performs a redirect by setting the Location header to the given target  URL/Hpath and the status code (should be one of 301, 302, 303 or 307) in the  [ object stored in a ( monad. Note that the target URL is not  validated in any way. Log an error message in the  monad 1Adds the output from the given enumerator to the [  stored in the  monad state. Adds the given  to the body of the [ stored in the  |  monad state. Adds the given strict  to the body of the [ stored  in the  monad state. @Warning: This function is intentionally non-strict. If any pure 6 exceptions are raised by the expression creating the ,  the exception won'.t actually be raised within the Snap handler. Adds the given lazy  to the body of the [ stored  in the  monad state. @Warning: This function is intentionally non-strict. If any pure 6 exceptions are raised by the expression creating the ,  the exception won'.t actually be raised within the Snap handler. Adds the given strict  to the body of the [ stored in  the  monad state. @Warning: This function is intentionally non-strict. If any pure 6 exceptions are raised by the expression creating the ,  the exception won'.t actually be raised within the Snap handler. Adds the given lazy  to the body of the [ stored in the   monad state. @Warning: This function is intentionally non-strict. If any pure 6 exceptions are raised by the expression creating the ,  the exception won'.t actually be raised within the Snap handler. :Sets the output to be the contents of the specified file. Calling 4 will overwrite any output queued to be sent in the  [9. If the response body is not modified after the call to  , Snap will use the efficient  sendfile() system call on  platforms that support it. (If the response body is modified (using  ), the file  will be read using mmap(). ESets the output to be the contents of the specified file, within the  given (start,end) range. Calling 0 will overwrite any output queued to be sent in  the [9. If the response body is not modified after the call to  , Snap will use the efficient  sendfile() system call on  platforms that support it. (If the response body is modified (using  ), the file  will be read using mmap().  Runs a  action with a locally-modified i state  object. The i/ object in the Snap monad state after the call $ to localRequest will be unchanged. ! Fetches the i. from state and hands it to the given action. " Fetches the [. from state and hands it to the given action. # Modifies the i in the state to set the m D field to the value in the X-Forwarded-For header. If the header is ) not present, this action has no effect. CThis action should be used only when working behind a reverse http E proxy that sets the X-Forwarded-For header. This is the only way to @ ensure the value in the X-Forwarded-For header can be trusted. @This is provided as a filter so actions that require the remote E address can get it in a uniform manner. It has specifically limited A functionality to ensure that its transformation can be trusted,  when used correctly. $ Modifies the i in the state to set the m > field to the value from the header specified. If the header 6 specified is not present, this action has no effect. CThis action should be used only when working behind a reverse http E proxy that sets the header being looked at. This is the only way to 0 ensure the value in the header can be trusted. @This is provided as a filter so actions that require the remote E address can get it in a uniform manner. It has specifically limited A functionality to ensure that its transformation can be trusted,  when used correctly. %AThis function brackets a Snap action in resource acquisition and / release. This is provided because MonadCatchIO's  function  doesn';t work properly in the case of a short-circuit return from  the action being bracketed. ;In order to prevent confusion regarding the effects of the A aquisition and release actions on the Snap state, this function  doesn':t accept Snap actions for the acquire or release actions. AThis function will run the release action in all cases where the B acquire action succeeded. This includes the following behaviors ! from the bracketed Snap action.  Normal completion / Short-circuit completion, either from calling  or   An exception being thrown. &5Terminate the HTTP session with the given exception. 'FTerminate the HTTP session and hand control to some external handler, $ escaping all further HTTP traffic. IThe external handler takes two arguments: a function to modify the thread's ) timeout, and a write end to the socket. (Runs a  monad action in the ' Iteratee IO' monad. (Post-process a finalized HTTP response:  fixup content-length header  * properly handle 204/304 responses - * if request was HEAD, remove response body <Note that we do NOT deal with transfer-encoding: chunked or connection: close here. )See 8. Looks up a value for the given named parameter in the  iC. If more than one value was entered for the given parameter name,  )! gloms the values together with:   " "*See 8. Looks up a value for the given named parameter in the ! POST form parameters mapping in i. If more than one value was ' entered for the given parameter name, * gloms the values  together with:   " "+See 8. Looks up a value for the given named parameter in the $ query string parameters mapping in i. If more than one value was ' entered for the given parameter name, + gloms the values  together with:   " ",See }!. Convenience function to return  from the  i inside of a  instance. -See }!. Convenience function to return  from the  i inside of a  instance. .See }!. Convenience function to return  from the  i inside of a  instance. /Gets the HTTP  with the specified name. 0Gets the HTTP 1 with the specified name and decodes it. If the ) decoding fails, the handler calls pass. 1Expire the given  in client' s browser. 2'Causes the handler thread to be killed n seconds from now. 30Causes the handler thread to be killed at least n seconds from now. 4DModifies the amount of time remaining before the request times out. 5 Returns an 4 action which you can use to set the handling thread's  timeout value. 6 Returns an 7 action which you can use to modify the timeout value. a#size of the largest request body we' re willing 2 to accept. If a request body longer than this is  received, a > is  thrown. See M.  the output  is passed to this  ), and then the resulting  is # fed the request body stream. Your ) is ) responsible for transforming the input.  path component to match handler to run  path to match against handler to run    output to add  !"#$%&'()parameter name to look up *parameter name to look up +parameter name to look up ,-./01 Cookie name Cookie domain 23456     U      !"#$%&'()*+,-./0123456U      !"#$%&'()*+,-./0123456     None  NoneEThe internal data type you use to build a routing tree. Matching is done unambiguously.   and ! routes can have a fallback route:  For  :, the fallback is routed when there is nothing to capture  - For !$, the fallback is routed when we can't find a route in its map 4Fallback routes are stacked: i.e. for a route like:  7 Dir [("foo", Capture "bar" (Action bar) NoRoute)] baz visiting the URI foo/ will result in the bar capture being empty and triggering its fallback. It'*s NoRoute, so we go to the nearest parent 0fallback and try that, which is the baz action. 7BA web handler which, given a mapping from URL entry points to web ? handlers, efficiently routes requests to the correct handler. ?The URL entry points are given as relative paths, for example:  ( route [ ("foo/bar/quux", fooBarQuux) ] &If the URI of the incoming request is   /foo/bar/quux or   /foo/bar/quux/...anything... #then the request will be routed to " fooBarQuux", with z  set to "/foo/bar/quux/" and y set to  "...anything...". CA path component within an URL entry point beginning with a colon (":")  is treated as a variable capture*; the corresponding path component within * the request URI will be entered into the } parameters mapping with 3 the given name. For instance, if the routes were:  + route [ ("foo/:bar/baz", fooBazHandler) ] Then a request for "/foo/ saskatchewan/baz" would be routed to   fooBazHandler with a mapping for:   "bar" => "saskatchewan" in its parameters table. GLonger paths are matched first, and specific routes are matched before % captures. That is, if given routes:  * [ ("a", h1), ("a/b", h2), ("a/:x", h3) ] a request for "/a/b" will go to h2, "/a/s" for any s will  go to h3, and "/a" will go to h1. The following example matches "/article" to an article index,  "/login" to a login, and "/article/..." to an article renderer.  & route [ ("article", renderIndex) ( , ("article/:id", renderArticle) 0 , ("login", method POST doLogin) ]  URL decoding MA short note about URL decoding: path matching and variable capture are done  on decoded URLs, but the contents of z and y will L contain the original encoded URL, i.e. what the user entered. For example,  in the following scenario:   route [ ("a b c d/", foo ) ] A request for "/a+b+c+d" will be sent to foo with z set  to "a+b+c+d". KThis behaviour changed as of Snap 0.6.1; previous versions had unspecified  (and buggy!) semantics here. 8The 8 function is the same as ", except it doesn't  change the request'9s context path. This is useful if you want to route to a = particular handler but you want that handler to receive the y as  it is. #! $%&78'(".action to run before we call the user handler the "context"; the list of path segments we've 0 already successfully matched, in reverse order "the list of path segments we haven't yet matched ) #! $%&78'(" $ !#%&78'(") None)1[bciklmnoqruvwxyz{|}~      !"#$%&'()*+,-./012345678(%&'    78  !"iklmnoqruvwxyz{|}~[bc1#$klmnoqruvwxyz{|}~)*+,-.bc1/023456)None)1[bciklmnoqruvwxyz{|}~      !"#$%&'()*+,-./012345678None9The 91 datatype enumerates the different kinds of HTTP H requests you can generate using the testing interface. Most users will  prefer to use the S, U, V, W, and  T convenience functions. Athe file's name Bthe file's content-type Cthe file contents E&a file upload consisting of the given ? values. F(a form variable consisting of the given  values. GA request body of type " multipart/ form-data" consists of a set of K named form parameters, each of which can by either a list of regular form " values or a set of file uploads. HFRequestBuilder is a monad transformer that allows you to conveniently  build a snap i for testing. IRuns a H, producing the desired i. N.B. please don';t use the request you get here in a real Snap application;  things will probably break. Don't say you weren' t warned :-) JSets the type of the i being built. KSets the request'2s query string to be the raw bytestring provided, I without any escaping or other interpretation. Most users should instead  choose the L, function, which takes a parameter mapping. L>Escapes the given parameter mapping and sets it as the request's query  string. MISets the given header in the request being built, overwriting any header % with the same name already present. N2Adds the given header to the request being built. OSets the request's  content-type to the given MIME type. PIControls whether the test request being generated appears to be an https  request or not. QSets the test request's http version RSets the request',s path. The path provided must begin with a "/" and  must not? contain a query string; if you want to provide a query string $ in your test request, you must use L or K.  Note that z is never set by any H function. SBuilds an HTTP "GET"* request with the given query parameters. TBuilds an HTTP "DELETE"* request with the given query parameters. UBuilds an HTTP "POST"3 request with the given form parameters, using the  " application/x-www-form-urlencoded" MIME type. VBuilds an HTTP "POST"3 request with the given form parameters, using the  " form-data/ multipart" MIME type. WBuilds an HTTP "PUT" request. X Builds a "raw" HTTP "POST", request, with the given MIME type and body  contents. YGiven a web handler in the  monad, and a H defining 5 a test request, runs the handler, producing an HTTP [. IThis function will produce almost exactly the same output as running the H handler in a real server, except that chunked transfer encoding is not  applied, and the "Transfer-Encoding"" header is not set (this makes it " easier to test response output). Z&Given a web handler in some arbitrary  monad, a function K specifying how to evaluate it within the context of the test monad, and a  H9 defining a test request, runs the handler, producing an  HTTP [. [Given a web handler in the  monad, and a H defining a K test request, runs the handler and returns the monadic value it produces. Throws an exception if the  handler early-terminates with   or *. \&Given a web handler in some arbitrary  monad, a function K specifying how to evaluate it within the context of the test monad, and a  H: defining a test request, runs the handler, returning the  monadic value it produces. Throws an exception if the  handler early-terminates with   or *. ]$Dumps the given response to stdout. ^-Converts the given response to a bytestring. 29:;<=>?@ABCDEFGH+,IJ-./0123KLMNOPQRS request path request's form parameters T request path request's form parameters U request path request's form parameters V request path multipart form parameters W request path request body MIME content-type request body contents X request path request body MIME content-type request body contents Ya request builder a web handler Za function defining how the  monad should be run a request builder a web handler [\a function defining  how the   monad should be run a request builder a web handler ]^456&9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^&9>=<;:?@ABCDFEGH+,IJ-./0123KLMNOPQRSTUVWXYZ[\]^456None,9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^,HGDFE?@ABC9>=<;:IYZ[\SUVWXTNOMQLKRJP]^ None_EA collection of options for serving static files out of a directory. aCFiles to look for when a directory is requested (e.g., index.html) b>Handler to generate a directory listing if there is no index. cCMap of extensions to pass to dynamic file handlers. This could be I used, for example, to implement CGI dispatch, pretty printing of source  code, etc. d(MIME type map to look up content types. eAHandler that is called before a file is served. It will only be F called when a file is actually found, not for generated index pages. fA type alias for MIME type g"A type alias for dynamic handlers hGets a path from the i using y and makes sure it is I safe to use for opening files. A path is safe if it is a relative path  and has no ..6 elements to escape the intended directory structure. iEThe default set of mime type mappings we use when serving files. Its  value:  Map.fromList [ 9 ( ".asc" , "text/plain" ), 9 ( ".asf" , "video/x-ms-asf" ), 9 ( ".asx" , "video/x-ms-asf" ), 9 ( ".avi" , "video/x-msvideo" ), 9 ( ".bz2" , "application/x-bzip" ), 9 ( ".c" , "text/plain" ), 9 ( ".class" , "application/octet-stream" ), 9 ( ".conf" , "text/plain" ), 9 ( ".cpp" , "text/plain" ), 9 ( ".css" , "text/css" ), 9 ( ".cxx" , "text/plain" ), 9 ( ".dtd" , "text/xml" ), 9 ( ".dvi" , "application/x-dvi" ), 9 ( ".gif" , "image/gif" ), 9 ( ".gz" , "application/x-gzip" ), 9 ( ".hs" , "text/plain" ), 9 ( ".htm" , "text/html" ), 9 ( ".html" , "text/html" ), 9 ( ".ico" , "image/x-icon" ), 9 ( ".jar" , "application/x-java-archive" ), 9 ( ".jpeg" , "image/jpeg" ), 9 ( ".jpg" , "image/jpeg" ), 9 ( ".js" , "text/javascript" ), 9 ( ".json" , "application/json" ), 9 ( ".log" , "text/plain" ), 9 ( ".m3u" , "audio/x-mpegurl" ), 9 ( ".mov" , "video/quicktime" ), 9 ( ".mp3" , "audio/mpeg" ), 9 ( ".mpeg" , "video/mpeg" ), 9 ( ".mpg" , "video/mpeg" ), 9 ( ".ogg" , "application/ogg" ), 9 ( ".pac" , "application/x-ns-proxy-autoconfig" ), 9 ( ".pdf" , "application/pdf" ), 9 ( ".png" , "image/png" ), 9 ( ".ps" , "application/postscript" ), 9 ( ".qt" , "video/quicktime" ), 9 ( ".sig" , "application/pgp-signature" ), 9 ( ".spl" , "application/futuresplash" ), 9 ( ".svg" , "image/svg+xml" ), 9 ( ".swf" , "application/x-shockwave-flash" ), 9 ( ".tar" , "application/x-tar" ), 9 ( ".tar.bz2" , "application/x-bzip-compressed-tar" ), 9 ( ".tar.gz" , "application/x-tgz" ), 9 ( ".tbz" , "application/x-bzip-compressed-tar" ), 9 ( ".text" , "text/plain" ), 9 ( ".tgz" , "application/x-tgz" ), 9 ( ".torrent" , "application/x-bittorrent" ), 9 ( ".txt" , "text/plain" ), 9 ( ".wav" , "audio/x-wav" ), 9 ( ".wax" , "audio/x-ms-wax" ), 9 ( ".wma" , "audio/x-ms-wma" ), 9 ( ".wmv" , "video/x-ms-wmv" ), 9 ( ".xbm" , "image/x-xbitmap" ), 9 ( ".xml" , "text/xml" ), 9 ( ".xpm" , "image/x-xpixmap" ), 9 ( ".xwd" , "image/x-xwindowdump" ), : ( ".zip" , "application/zip" ) ] 7=Style information for the default directory index generator. jIAn automatic index generator, which is fairly small and does not rely on J any external files (which may not be there depending on external request  routing). A f= is passed in to display the types of files in the directory L listing based on their extension. Preferably, this is the same as the map  in the _ JThe styles parameter allows you to apply styles to the directory listing. G The listing itself consists of a table, containing a header row using J th elements, and one row per file using td elements, so styles for those 1 pieces may be attached to the appropriate tags. kGA very simple configuration for directory serving. This configuration  uses built-in MIME types from i, and has no index files, , index generator, dynamic file handlers, or e. l@A reasonable default configuration for directory serving. This - configuration uses built-in MIME types from i , serves  common index files  index.html and  index.htm, but does not autogenerate < directory indexes, nor have any dynamic file handlers. The e  will not do anything. mEA more elaborate configuration for file serving. This configuration  uses built-in MIME types from i, serves common index files   index.html and  index.htm-, and autogenerates directory indexes with a = Snap-like feel. It still has no dynamic file handlers, nor e, " which should be added as needed. $Files recognized as indexes include  index.html,  index.htm,   default.html,  default.htm,  home.html nEServes static files from a directory using the default configuration  as given in l. oAServes static files from a directory. Configuration options are  passed in a _- that captures various choices about desired ' behavior. The relative path given in y is searched for a M requested file, and the file is served with the appropriate mime type if it  is found. Absolute paths and ".."& are prohibited to prevent files from ( being served from outside the sandbox. pHServes a single file specified by a full or relative path. If the file 7 does not exist, throws an exception (not that it does not pass to the + next handler). The path restrictions on n don' t apply to A this function since the path is not being supplied by the user. qSame as p+, with control over the MIME mapping used. "89:;<=_`abcdefghi7j&MIME type mapping for reporting types Style info to insert in header  Directory to generate index for klmnDirectory to serve from oConfiguration options Directory to serve from p path to file q MIME type  path to file >r?@ABCD_`abcdefghijklmnopqrhfg_`abcdeklmjirnopq8;9<=:_`abcdefghi7jklmnopq>r?@ABCD NoneE=This is the file which is currently being written to. If the @ calling function gets an exception here, it is responsible for ! closing and deleting this file. FC.. and these files have already been successfully read and closed. sUpload policy can be set on an "general" basis (using t), B but handlers can also make policy decisions on individual files/parts : uploaded. For each part uploaded, handlers can decide: ) whether to allow the file upload at all 0 the maximum size of uploaded files, if allowed tt/ controls overall policy decisions relating to   multipart/ form-data uploads, specifically: K whether to treat parts without filenames as form input (reading them into  the } map) J because form input is read into memory, the maximum size of a form input > read in this manner, and the maximum number of form inputs C the minimum upload rate a client must maintain before we kill the K connection; if very low-bitrate uploads were allowed then a Snap server > would be vulnerable to a trivial denial-of-service using a  " slowloris" -type attack I the minimum number of seconds which must elapse before we start killing . uploads for having too low an upload rate. D the amount of time we should wait before timing out the connection . whenever we receive input from the client. y;All of the exceptions defined in this package inherit from  y, so if you write  0 foo `catch` \(e :: FileUploadException) -> ... you can catch a w, a u, etc. zz contains information about a "part" in a request uploaded  with Content-type: multipart/ form-data. IReads uploaded files into a temporary directory and calls a user handler  to process them. KGiven a temporary directory, global and file-specific upload policies, and E a user handler, this function consumes a request body uploaded with  Content-type: multipart/ form-data'. Each file is read into the temporary H directory, and then a list of the uploaded files is passed to the user 6 handler. After the user handler runs (but before the [ body  )> is streamed to the client), the files are deleted from disk; E so if you want to retain or use the uploaded files in the generated = response, you would need to move or otherwise process them. 6The argument passed to the user handler is a list of:  6 (PartInfo, Either PolicyViolationException FilePath) "The first half of this tuple is a z, which contains the G information the client browser sent about the given upload part (like C filename, content-type, etc). The second half of this tuple is an G  stipulating that either:  A the file was rejected on a policy basis because of the provided  s handler 5 the file was accepted and exists at the given path. If the request's  Content-type was not " multipart/formdata", this ! function skips processing using .  If the client'7s upload rate passes below the configured minimum (see   and ), this function H terminates the connection. This setting is there to protect the server 4 against slowloris-style denial of service attacks.  If the given t, stipulates that you wish form inputs to be  placed in the } parameter map (using ), and M a form input exceeds the maximum allowable size, this function will throw a  u. GIf an uploaded part contains MIME headers longer than a fixed internal 8 threshold (currently 32KB), this function will throw a w. :Given an upload policy and a function to consume uploaded "parts", & consume a request body uploaded with Content-type: multipart/ form-data. & Normally most users will want to use  (which writes K uploaded files to a temporary directory and passes their names to a given 5 handler) rather than this function; the lower-level  J function should be used if you want to stream uploaded files to your own  iteratee function. If the request's  Content-type was not " multipart/formdata", this ! function skips processing using .  If the client'7s upload rate passes below the configured minimum (see   and ), this function H terminates the connection. This setting is there to protect the server 4 against slowloris-style denial of service attacks.  If the given t, stipulates that you wish form inputs to be  placed in the } parameter map (using ), and M a form input exceeds the maximum allowable size, this function will throw a  u. GIf an uploaded part contains MIME headers longer than a fixed internal 8 threshold (currently 32KB), this function will throw a w. GA reasonable set of defaults for upload policy. The default policy is: maximum form input size 128kB maximum number of form inputs 10 minimum upload rate 1kB/s %seconds before rate limiting kicks in 10 inactivity timeout 20 seconds FDoes this upload policy stipulate that we want to treat parts without  filenames as form input? JSet the upload policy for treating parts without filenames as form input. AGet the maximum size of a form input which will be read into our  } map. ASet the maximum size of a form input which will be read into our  } map. AGet the maximum size of a form input which will be read into our  } map. ASet the maximum size of a form input which will be read into our  } map. Get the minimum rate (in bytes\second/ ) a client must maintain before  we kill the connection. Set the minimum rate (in bytes\second/ ) a client must maintain before  we kill the connection. GGet the amount of time which must elapse before we begin enforcing the  upload rate minimum GSet the amount of time which must elapse before we begin enforcing the  upload rate minimum Get the "upload timeout".. Whenever input is received from the client, B the connection timeout is set this many seconds in the future. Set the upload timeout. #Disallows the file to be uploaded. 2Allows the file to be uploaded, with maximum size n. HGiven a 6 stream which is partitioned by boundary values, read H up until the next boundary and send all of the chunks into the wrapped  iteratee I Assuming we'1ve already identified the boundary value and run  8 to split the input up into parts which match and parts  which don't, run the given $ iteratee over each part and grab a  list of the resulting values. RJKLMEFNOPsQRtSTUVWXYuZvw[xy\]^_`z{|}~temporary directory general upload policy per-part upload policy user handler (see function  description) global upload policy part processor abcmaximum size of form input file reading code deboundary value part processor fghHIijklmnopqrstuvwxystuvwxyz{|}~ z{|}~tsywxxuvv6JKLMEFNPOsQRtSTUVWXYuZvw[xy_\`]^z{|}~abcdefghHIijklmnopqrstuvwxy NoneRuns a , web handler with compression if available. (If the client has indicated support for gzip or deflate in its  Accept-Encoding header, and the  Content-Type in the response is one of  the following types:   application/ x-javascript  application/json text/css text/html text/ javascript text/plain text/xml  application/x-font-truetypeThen the given handler'$s output stream will be compressed,  Content-Encoding, will be set in the output headers, and the  Content-Length' will be cleared if it was set. (We can't process the : stream in O(1) space if the length is known beforehand.) <The wrapped handler will be run to completion, and then the [  that's contained within the  monad state will be passed to   to prevent further processing.  The same as (, with control over which MIME types to  compress.  Turn off compression by setting "Content-Encoding: identity" in the  response headers. z{the web handler to run set of compressible MIME types the web handler to run |}~buffer? buffer?  z{|}~None2What kind of proxy is this? Affects which headers  pulls the  original remote address from. 'Currently only proxy servers that send X-Forwarded-For or  Forwarded-For  are supported. Use the  Forwarded-For or  X-Forwarded-For header "no proxy, leave the request alone Rewrite m if we're behind a proxy.  !"#$%&'()*+*,*-*./0/1/23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwwxyz{|}~          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRRSTUVWXYZ[\]^_`abUcdefghijkl m m n o p q r s t u v w x y z { | } ~                                  TXYZ[\      Nb       !"#$%&'()*+,-./0123456789:;<=>?@ZABCDEFGHIJK L M N O M P Q R S T U V W X Y Z[\ ] ^ _ _ ` ` 6 a 6  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 { | } ~                   snap-core-0.9.4.1 Snap.IterateeSnap.Util.ReadableSnap.Internal.DebugSnap.Types.HeadersSnap.Internal.Iteratee.DebugSnap.Internal.Http.TypesSnap.Internal.Parsing Snap.TestSnap.Internal.Exceptions Snap.CoreSnap.Util.FileServeSnap.Util.FileUploadsSnap.Util.GZipSnap.Util.Proxy)Snap.Internal.Iteratee.BoyerMooreHorspoolSnap.Internal.Parsing.FastSethandleFileUploadsSnap.Internal.Test.AssertionsSnap.Internal.TypesSnap.Internal.InstancesSnap.Internal.Routing Snap.Types!Snap.Internal.Test.RequestBuilderenumerator-0.4.20Data.Enumerator catchError throwErrorData.Enumerator.InternalIterateepeek liftTransisEOFsequence$==$joinI concatEnumsenumList printChunksrun_runData.Enumerator.Compatibility liftFoldM liftFoldL' liftFoldLliftIData.Enumerator.Listheadconsumemap checkDoneenumEOF<==<>==>$$==<<>>==continueyieldreturnIChunksEOFStreamContinueYieldErrorStep runIteratee Enumerator EnumerateeReadablefromBSdebug debugErrno debugIgnoredebugErrnoIgnoreHeadersemptynullmemberlookuplookupWithDefaultinsertsetdeletefoldtoListfromListInvalidRangeExceptionTooManyBytesReadExceptionRateTooSlowExceptionShortWriteException enumBuilderenumBSenumLBS skipToEof countBytesmkIterateeBufferunsafeBufferIterateeunsafeBufferIterateeWithBufferdropdrop'take takeExactlytakeNoMoreThanenumFileenumFilePartialmapEnummapIterenumBuilderToByteStringunsafeEnumBuilderToByteStringenumByteStringToBuilderjoinI' killIfTooSlow showBuilder debugIterateeiterateeDebugWrapperWithiterateeDebugWrapperResponse rspHeaders rspCookiesrspHttpVersionrspContentLengthrspBody rspStatusrspStatusReasonrspTransformingRqBodyrspOutputBuffering ResponseBodySendFileEnumRequest rqServerName rqServerPort rqRemoteAddr rqRemotePort rqLocalAddr rqLocalPortrqLocalHostname rqIsSecure rqHeadersrqBodyrqContentLengthrqMethod rqVersion rqCookies rqPathInfo rqContextPathrqURI rqQueryStringrqParams rqQueryParams rqPostParamsSomeEnumeratorParamsCookie cookieName cookieValue cookieExpires cookieDomain cookiePath cookieSecurecookieHttpOnly HttpVersionMethodPATCHCONNECTOPTIONSTRACEDELETEPUTPOSTHEADGET HasHeaders updateHeadersheadersc_format_log_timec_format_http_timec_parse_http_time set_c_locale addHeader setHeader getHeaders getHeader listHeaders deleteHeader rspBodyMap rspBodyToEnumrqParam rqPostParam rqQueryParamrqModifyParams rqSetParam emptyResponsesetResponseBodysetResponseStatussetResponseCodemodifyResponseBodysetContentTypeaddResponseCookiegetResponseCookiegetResponseCookiesdeleteResponseCookiemodifyResponseCookiesetContentLengthclearContentLengthgetBufferingModesetBufferingMode formatLogTimeformatHttpTime parseHttpTimefromStrtoStrstatusReasonMapDList fullyParseparseNumspdigitletteruntilEOLcrlf generateFSspacespSpaces fieldChars fieldCharSetpHeaderspWord pQuotedString isRFCTextmatchAllpAvPairspAvPair pParametertrimpValueWithParameterspContentTypeWithParameterspTokenisToken tokenTableparseToCompletion pUrlEscaped urlDecode urlEncodeurlEncodeBuilderurlEncodeTablehexdfinishparseUrlEncodedbuildUrlEncodedprintUrlEncodedpCookies parseCookie strictize unsafeFromHex unsafeFromIntgetResponseBody assertSuccess assert404assertRedirectToassertRedirectassertBodyContainsEscapeHttpHandlerEscapeHttpExceptionConnectionTerminatedExceptionUncatchableExceptionuncatchableExceptionToException!uncatchableExceptionFromExceptionNoHandlerExceptionSnap MonadSnapliftSnaprunRequestBodygetRequestBodyreadRequestBodytransformRequestBody finishWithcatchFinishWithpassmethodmethodsdirpathpathArgifTop getRequest getsRequest getResponse getsResponse putResponse putRequest modifyRequestmodifyResponseredirect redirect'logError addToOutput writeBuilderwriteBSwriteLBS writeText writeLazyTextsendFilesendFilePartial localRequest withRequest withResponseipHeaderFilteripHeaderFilter' bracketSnapterminateConnection escapeHttprunSnapgetParam getPostParam getQueryParam getParams getPostParamsgetQueryParams getCookie readCookie expireCookie setTimeout extendTimeout modifyTimeoutgetTimeoutActiongetTimeoutModifierroute routeLocal RequestType DeleteRequestUrlEncodedPostRequestMultipartPostRequestRequestWithRawBody GetRequestFileData fdFileName fdContentType fdContentsMultipartParamFilesFormDataMultipartParamsRequestBuilder buildRequestsetRequestTypesetQueryStringRawsetQueryString setSecuresetHttpVersionsetRequestPathgetpostUrlEncoded postMultipartputpostRaw runHandler runHandlerM evalHandler evalHandlerM dumpResponseresponseToStringDirectoryConfig indexFilesindexGeneratordynamicHandlers mimeTypes preServeHookMimeMap HandlerMap getSafePathdefaultMimeTypesdefaultIndexGeneratorsimpleDirectoryConfigdefaultDirectoryConfigfancyDirectoryConfigserveDirectoryserveDirectoryWith serveFile serveFileAsfileTypePartUploadPolicy UploadPolicyPolicyViolationExceptionpolicyViolationExceptionReasonBadPartExceptionbadPartExceptionReasonFileUploadExceptionPartInfo partFieldName partFileNamepartContentTypehandleMultipartfileUploadExceptionReasondefaultUploadPolicydoProcessFormInputssetProcessFormInputsgetMaximumFormInputSizesetMaximumFormInputSizegetMaximumNumberOfFormInputssetMaximumNumberOfFormInputsgetMinimumUploadRatesetMinimumUploadRategetMinimumUploadSecondssetMinimumUploadSecondsgetUploadTimeoutsetUploadTimeoutdisallowallowWithMaximumSizewithCompressionwithCompression' noCompression ProxyTypeX_Forwarded_ForNoProxy behindProxy checkComplete$fReadableDouble$fReadableInteger $fReadableInt$fReadableText$fReadableByteString MatchInfoNoMatchMatch lookaheadmatches bmhEnumeratee tableCutoff memberWord8 memberCharIFastSetTableSortedfromSetshiftRshiftLindexmkTable charClass $fShowFastSetHunH streamLengthbUFSIZtake' _enumFile_enumFilePartialmaxMMapFileSize tooBigForMMapgetTime $fExceptionInvalidRangeException$fShowInvalidRangeException$$fExceptionTooManyBytesReadException$fExceptionRateTooSlowException$fExceptionShortWriteException$fShowTooManyBytesReadException$fShowRateTooSlowException$fShowShortWriteException$fMonadCatchIOIterateeblaze-builder-0.3.1.1'Blaze.ByteString.Builder.Internal.TypesBuilderbaseForeign.C.TypesCTime$fHasHeadersResponse$fShowResponse$fHasHeadersHeaders$fHasHeadersRequest $fShowRequest $fEqMethod$fExceptionEscapeHttpException$fShowEscapeHttpException($fExceptionConnectionTerminatedException#$fShowConnectionTerminatedException$fExceptionUncatchableException$fShowUncatchableExceptionGHC.BaseMonadControl.Applicative Alternative Control.Monad MonadPlus<|>ghc-prim GHC.TypesIOtransformers-0.3.0.0Control.Monad.IO.ClassMonadIO!MonadCatchIO-transformers-0.3.0.0Control.Monad.CatchIO MonadCatchIOControl.Monad.Trans.ClassliftControl.Monad.Trans.State.LazyStateT snapTyConsget mtl-2.1.2Control.Monad.State.Classsmodifymodifygetsbytestring-0.10.0.2Data.ByteString.Internal ByteStringData.ByteString.Lazy.Internal text-0.11.2.3Data.Text.InternalTextData.Text.Lazy.Internalbracketfail fixupResponseData.ByteString intercalate SnapState _snapRequest _snapResponse _snapLogError_snapModifyTimeoutunSnap SnapResultEarlyTerminationPassOnProcessing SnapValuesnapBind snapReturnsnapFailrethrowIfUncatchableliftIterupdateContextPathpathWithevalSnap getParamFrom$fExceptionNoHandlerException$fShowNoHandlerException$fTypeable1Snap$fMonadSnapSnap$fAlternativeSnap$fApplicativeSnap $fFunctorSnap$fMonadError[]Snap$fMonadPlusSnap$fMonadCatchIOSnap $fMonadIOSnap $fMonadSnap$fMonadSnapWriterT$fMonadSnapWriterT0$fMonadSnapStateT$fMonadSnapStateT0$fMonadSnapReaderT$fMonadSnapRWST$fMonadSnapRWST0$fMonadSnapListT$fMonadSnapErrorT$fMonadSnapContT$fAlternativeContT$fMonadPlusContTRouteCaptureDirroute'NoRouteAction routeHeightrouteEarliestNC splitPathpRoute $fMonoidRoutemzeromkDefaultRequest makeBoundarymultipartHeaderencodeFormDatamultipartMixed encodeFilesencodeMultipartfixupURIrGetrPutrModifysnapIndexStylesRangeReqSuffixRangeReq _suffixLength _rangeFirst _rangeLast lookupExtdefaultMimeType rangeParser checkRangeReqdbguriWithoutQueryStringqueryStringSuffix _currentFile_alreadyReadFiles Data.EitherEither processPart processParts UploadedFilesUploadedFilesStateFile_maximumFileSizeprocessFormInputsmaximumFormInputSizemaximumNumberOfFormInputsminimumUploadRateminimumUploadSeconds uploadTimeoutWrappedFileUploadException_wrappedFileUploadException!_wrappedFileUploadExceptionReasonGenericFileUploadException!_genericFileUploadExceptionReasonuploadExceptionToExceptionuploadExceptionFromExceptioncaptureVariableOrReadFile fileReaderinternalHandleMultipartgetContentType getFieldName findParameolpHeadersWithSeparator toHeaders mAX_HDRS_SIZEemptyUploadedFilesStatenewUploadedFilescleanupUploadedFilesopenFileForUploadcloseActiveFile eatException makeTempFile$fShowPolicyViolationException#$fExceptionPolicyViolationException$fShowBadPartException$fExceptionBadPartException$fExceptionFileUploadException$fShowFileUploadExceptionBadAcceptEncodingExceptioncompressibleMimeTypesgzipCompressioncompressCompression gcompress ccompress acceptParserparseAcceptEncoding%$fExceptionBadAcceptEncodingException $fShowBadAcceptEncodingException xForwardedFor