%À      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ non-portable experimental Anders Kaseorg <andersk@mit.edu> Safe-Inferred A MIME media type value.  The $ instance is derived automatically.  Use   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"). 9A string with case insensitive equality and comparisons. HTTP headers. 5Parse the standard representation of a content-type. 6 If the input cannot be parsed, this function calls  / with a (hopefully) informative error message. RFC 822 LWSP-char #RFC 822 CRLF (but more permissive)  One line 2  )  non-portable experimental Anders Kaseorg <andersk@mit.edu> Safe-Inferred !Read a multi-part message from a . !Read a multi-part message from a .  Fails on parse errors. 4Split a multipart message into the multipart parts. =Drop everything up to and including the first line starting  with the boundary. +Split a string at the first boundary line. :Check whether a string starts with two dashes followed by  the given boundary string. !Check whether a string for which  returns true , has two dashes after the boudary string. 0Checks whether a string starts with two dashes. 4Drop everything up to and including the first CRLF. ESplit 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. ; If there is no empty line, the entire input is returned  as the first result. ;Split a string at the first CRLF. The CRLF is not included # in any of the returned strings. 5 If there is no CRLF, the entire input is returned  as the first string. 4Get the index and length of the first CRLF, if any. 7Drop 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.  Boundary  Boundary )The boundary, without the initial dashes )The boundary, without the initial dashes )The boundary, without the initial dashes String to split. 1The part before the boundary, the boundary line, 2 and the part after the boundary line. The CRLF 8 before and the CRLF (if any) after the boundary line 4 are not included in any of the strings returned.  Returns  if there is no boundary. )The boundary, without the initial dashes )The boundary, without the initial dashes String to split. String to split.   non-portable experimental Anders Kaseorg <andersk@mit.edu>None The result of a CGI program. 4The value of an input parameter, and some metadata. The input to a CGI action. Environment variables. 9Input parameters. For better laziness in reading inputs,  this is not a Map. )Raw request body. To avoid memory leaks, 7 this is the empty string if the request body has been  interpreted as inputs in  !application/x-www-form-urlencoded or  multipart/form-data format. NRuns a CGI action in a given environment. Uses Handles for input and output. ARuns a CGI action in a given environment. Uses lazy ByteStrings  for input and output. 4Gets and decodes the input according to the request  method and the content-type.  Builds an  object for a simple value. (The default content-type for variables. CGets the values of all CGI variables from the program environment. "Logs some message using the server's logging facility. 5 FIXME: does this have to be more general to support 8 FastCGI etc? Maybe we should store log messages in the  CGIState? #Gets inputs from the query string. Decodes application/x-www-form-urlencoded inputs. 'Formats name-value pairs as application/x-www-form-urlencoded. *Converts a single value to the application/ x-www-form-urlencoded encoding. !*Gets the name-value pairs from application/x-www-form-urlencoded data. ""Converts a single value from the  application/ x-www-form-urlencoded encoding. ,Gets input variables from the body, if any. Decodes a POST body. #0Takes the right number of bytes from the input. Decodes multipart/form-data input. $>Replaces all instances of a value in a list by another value. Same as  specialized to strings, but - returns the empty string if lookup fails. % %CGI environment variables, e.g. from . *Handle that input will be read from, e.g.  . ,Handle that output will be written to, e.g.  .  CGI action CGI environment variables. Request body.  CGI action.  Response (headers and content). CGI environment variables. Request body. ;A list of input variables and values, and the request body  if it was not interpreted. CGI environment variables. Input variables and values. Input variables and values.  !"#CGI environment variables. Request body. 'CONTENT_LENGTH bytes from the request , body, or the empty string if there is no  CONTENT_LENGTH. Content-type parameters  Request body Input variables and values. $Value to look for Value to replace it with  Input list  Output list %  !"#$%   # !"%$  !"#$% non-portable experimental Anders Kaseorg <andersk@mit.edu>None &8The class of CGI monads. Most CGI actions can be run in B any monad which is an instance of this class, which means that G you can use your own monad transformers to add extra functionality. 'Add a response header. ($Get something from the CGI request. )The CGIT monad transformer. ,!A simple CGI monad with just IO. -Run a CGI action. .?Throw an exception in a CGI monad. The monad is required to be  a , so that we can use  to guarantee ordering. /BCatches any expection thrown by a CGI action, and uses the given 0 exception handler if an exception is thrown. 0BCatches any exception thrown by an CGI action, and returns either K the exception, or if no exception was raised, the result of the action. 1Deprecated version of /. Use / instead. &'()*+,-./01&'()*+,-./01&'()*+,-./01&'()*+,-./01  Safe-Inferred23456789: 23456789:23456789:uportable General server side HTTP cookie library. Based on <http://wp.netscape.com/newsref/std/cookie_spec.html> experimental Anders Kaseorg <andersk@mit.edu> Safe-Inferred;;Contains all information about a cookie set by the server. =Name of the cookie. >Value of the cookie. ?Expiry date of the cookie. If , the 2 cookie expires when the browser sessions ends. 1 If the date is in the past, the client should " delete the cookie immediately. @5The domain suffix to which this cookie will be sent. A,The path to which this cookie will be sent. B* if this cookie should only be sent using  secure means. C1Construct a cookie with only name and value set. ; This client will expire when the browser sessions ends, 9 will only be sent to the server and path which set it $ and may be sent using any means. D4Get the value of a cookie from a string on the form  "5cookieName1=cookieValue1;...;cookieName2=cookieValue2".  This is the format of the Cookie HTTP header. EBDelete a cookie from the client by setting the cookie expiry date  to a date in the past. FHShow a cookie on the format used as the value of the Set-Cookie header. 4Show a name-value pair. FIXME: if the name or value 1 contains semicolons, this breaks. The problem 5 is that the original cookie spec does not mention # how to do escaping or quoting. G1Gets all the cookies from a Cookie: header value Return ( is the list is empty, otherwise return ! the last element of the list. ;<=>?@ABCName Value Cookie D Cookie name -Semicolon separated list of name-value pairs Cookie value, if found E.Cookie to delete. The only fields that matter  are =, @ and A Fname value GString to parse !Cookie name - cookie value pairs ;<=>?@ABCDEFG ;<=>?@ABCDEFG;<=>?@ABCDEFG'non-portable (uses Control.Monad.State) experimental Anders Kaseorg <andersk@mit.edu>NoneH1Compatibility wrapper for the old CGI interface. > Output the output from a function from CGI environment and ( input variables to an HTML document. I1Compatibility wrapper for the old CGI interface.  Runs a simple CGI server. 2 Note: if using Windows, you might need to wrap    around main. J/Note: if using Windows, you might need to wrap    around main. 7Returns the query string, or the request body if it is = a POST request, or the empty string if there is an error. HIThe port to run the server on. JCGI environment variables. Request body. Query string. HIJHIJ HIJ'non-portable (uses Control.Monad.State) experimental Anders Kaseorg <andersk@mit.edu>None2K9Run a CGI action. Typically called by the main function. 5 Reads input from stdin and writes to stdout. Gets ; CGI environment variables from the program environment. L Output a ". The output is assumed to be text/html, encoded using A ISO-8859-1. To change this, set the Content-type header using  ~. M Output a ". The output is assumed to be text/html, 6 encoded using ISO-8859-1. To change this, set the  Content-type header using ~. N)Do not output anything (except headers). ORedirect to some location. P6Catches any exception thrown by the given CGI action, ; returns an error page with a 500 Internal Server Error, : showing the exception information, and logs the error. Typical usage:  cgiMain :: CGI CGIResult  cgiMain = ...   main :: IO () & main = runCGI (handleErrors cgiMain) Q9Output a 500 Internal Server Error with information from  an . R1Output an error page to the user, with the given E HTTP status code in the response. Also logs the error information  using . Create an HTML error page. SUse R* to output and log a 404 Not Found error. TUse R3 to output and log a 405 Method Not Allowed error. UUse R0 to output and log a 500 Internal Server Error. V6Get the value of a CGI environment variable. Example: $ remoteAddr <- getVar "REMOTE_ADDR" X4Get all CGI environment variables and their values. Y The server'2s hostname, DNS alias, or IP address as it would $ appear in self-referencing URLs. Z/The port number to which the request was sent. [-The method with which the request was made.  For HTTP, this is "GET", "HEAD", "POST", etc. \4The extra path information, as given by the client. 9 This is any part of the request path that follows the  CGI program path. 9 If the string returned by this function is not empty, $ it is guaranteed to start with a '/'. 5Note that this function returns an unencoded string. , Make sure to percent-encode any characters > that are not allowed in URI paths before using the result of # this function to construct a URI.  See k, l and m for a higher-level  interface. ]The path returned by \, but with virtual-to-physical  mapping applied to it. ^/A virtual path to the script being executed, " used for self-referencing URIs. 5Note that this function returns an unencoded string. , Make sure to percent-encode any characters > that are not allowed in URI paths before using the result of # this function to construct a URI.  See k, l and m for a higher-level  interface. _AThe information which follows the ? in the URL which referenced @ this program. This is the percent-encoded query information.  For most normal uses, n and friends are probably  more convenient. `=The hostname making the request. If the server does not have 3 this information, Nothing is returned. See also a. a6The IP address of the remote host making the request. b?If the server supports user authentication, and the script is A protected, this is the protocol-specific authentication method  used to validate the user. c?If the server supports user authentication, and the script is ? protected, this is the username they have authenticated as. d6For queries which have attached information, such as < HTTP POST and PUT, this is the content type of the data.  You can use   to get a structured 1 representation of the the content-type value. e6For queries which have attached information, such as 9 HTTP POST and PUT, this is the length of the content  given by the client. f:Gets the value of the request header with the given name. ( The header name is case-insensitive.  Example:  requestHeader "User-Agent" k;Attempts to reconstruct the absolute URI of this program.  This does not include 7 any extra path information or query parameters. See  l for that. 9 If the server is rewriting request URIs, this URI can 6 be different from the one requested by the client.  See also m. >Characters in the components of the returned URI are escaped  when needed, as required by  Network.URI. lLike k, but the returned  also includes 9 any extra path information, and any query parameters. 9 If the server is rewriting request URIs, this URI can 6 be different from the one requested by the client.  See also m. >Characters in the components of the returned URI are escaped  when needed, as required by  Network.URI. 9Does percent-encoding as needed for URI path components. mBAttempts to reconstruct the absolute URI requested by the client, : including extra path information and query parameters. F If no request URI rewriting is done, or if the web server does not B provide the information needed to reconstruct the request URI, + this function returns the same value as l. >Characters in the components of the returned URI are escaped  when needed, as required by  Network.URI. n=Get the value of an input variable, for example from a form. C If the variable has multiple values, the first one is returned.  Example:  query <- getInput "query" oLike n, but returns a . pBGet all the values of an input variable, for example from a form. ; This can be used to get all the values from form controls - which allow multiple values to be selected.  Example: ' vals <- getMultiInput "my_checkboxes" qSame as p but using s. rGet the file name of an input. s<Get the content-type of an input, if the input exists, e.g.  image/jpeg. . For non-file inputs, this function returns  text/plain.  You can use   to get a structured 1 representation of the the content-type value. tSame as n3, but tries to read the value to the desired type. u(Get the names and values of all inputs. ? Note: the same name may occur more than once in the output, - if there are several values for the name. v(Get the names and values of all inputs. ? Note: the same name may occur more than once in the output, - if there are several values for the name. w&Get the names of all input variables. x/Get the uninterpreted request body as a String y6Get the uninterpreted request body as lazy ByteString zGet the value of a cookie. {Same as z3, but tries to read the value to the desired type. |Set a cookie. } Delete a cookie from the client ~Add a response header.  Example: ' setHeader "Content-type" "text/plain" Set the HTTP response status. :KLThe string to output. MThe string to output. NOA URL to redirect to. PQRHTTP Status code Status message Error information  Status code Status message Error information  Status code Status message Error information S$The name of the requested resource. TThe allowed methods. UError information. VThe name of the variable. WThe name of the variable. Default value XYZ[\]^_`abcdefghijklmnThe name of the variable. The value of the variable, " or Nothing, if it was not set. oThe name of the variable. The value of the variable, " or Nothing, if it was not set. pThe name of the variable. The values of the variable, 0 or the empty list if the variable was not set. qThe name of the variable. The values of the variable, 0 or the empty list if the variable was not set. rThe name of the variable. #The file name corresponding to the  input, if there is one. sThe name of the variable. )The content type, formatted as a string. tThe name of the variable.  if the variable does not exist , or if the value could not be interpreted  at the desired type. uvwxyzThe name of the cookie.  if the cookie does not exist. {The name of the cookie.  if the cookie does not exist , or if the value could not be interpreted  at the desired type. |}~ Header name. Header value. HTTP status code, e.g. 404 HTTP status message, e.g.  Not Found a  !"&),./0123456789:;<=>?@ABCHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~^&) ,K./01PLMNO~RQSTUnotxyuvwpqrsVWXYZ[\]^_`abcdefklm89674523ghij: ;<=>?@ABCz{|} !":KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$$%&'()*+,-./01234567789:;<=> ? ? @ @ A A B C DEEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~N  C      cgi-3001.1.8.3 Network.CGINetwork.CGI.CompatNetwork.CGI.ProtocolNetwork.CGI.MonadNetwork.CGI.CookieNetwork.CGI.HeaderNetwork.CGI.Multipart System.IOstdinstdoutNetwork.CGI.AcceptNetwork withSocketsDotransformers-0.3.0.0Control.Monad.IO.ClassMonadIOliftIOxhtml-3000.2.1Text.XHtml.InternalsHtml ContentTypectType ctSubtype ctParameters HeaderNameHeadersparseContentTypeshowContentType CGIResult CGINothing CGIOutputInput inputValue inputFilenameinputContentType CGIRequestcgiVars cgiInputscgiRequestBodyhRunCGI runCGIEnvFPS decodeInput getCGIVarslogCGI formEncode urlEncode formDecode urlDecode takeInputreplace maybeReadMonadCGI cgiAddHeadercgiGetCGITunCGITCGIrunCGITthrowCGIcatchCGItryCGIhandleExceptionCGILanguageContentEncodingCharset AcceptableAccept negotiateCookie cookieName cookieValue cookieExpires cookieDomain cookiePath cookieSecure newCookie findCookie deleteCookie showCookie readCookieswrapperpwrapperconnectToCGIScriptrunCGIoutput outputFPS outputNothingredirect handleErrorsoutputException outputErroroutputNotFoundoutputMethodNotAllowedoutputInternalServerErrorgetVargetVarWithDefaultgetVars serverName serverPort requestMethodpathInfopathTranslated scriptName queryString remoteHost remoteAddrauthType remoteUserrequestContentTyperequestContentLength requestHeader requestAcceptrequestAcceptCharsetrequestAcceptEncodingrequestAcceptLanguageprogURIqueryURI requestURIgetInput getInputFPS getMultiInputgetMultiInputFPSgetInputFilenamegetInputContentType readInput getInputs getInputsFPS getInputNamesgetBody getBodyFPS getCookie readCookie setCookie setHeader setStatusbaseGHC.ShowShowGHC.Basefailws1crLf lineStringContentDispositionContentTransferEncoding HeaderValueparseHeaderValueprettyHeaderValuepHeaderspHeaderextraFieldLinegetHeaderValueshowParameters p_parametergetContentTypegetContentTransferEncodinggetContentDispositionparseMlookupMcaseInsensitiveEqcaseInsensitiveComparelexeme literalStringbuggyLiteralStringheaderNameChar tspecials tokencharp_token text_charsp_text quoted_pair$fHeaderValueContentDisposition$$fHeaderValueContentTransferEncoding$fHeaderValueContentType$fOrdContentType$fEqContentType$fOrdHeaderName$fEqHeaderNameparseMultipartBodybytestring-0.10.0.0Data.ByteString.Lazy.Internal ByteStringhGetMultipartBodyGHC.IO.Handle.TypesHandle splitParts dropPreamblesplitAtBoundary isBoundaryisClosestartsWithDashesdropLinesplitAtEmptyLine splitAtCRLFfindCRLFdropCRLFBodyPart MultiPart parseBodyPartshowMultipartBody showBodyPart Data.MaybeNothingcrlf unlinesCRLF findCRorLFstartsWithCRLF simpleInputdefaultInputType queryInput formInput bodyInput decodeBodymultipartDecode lookupOrNilGHC.ListlookupformatResponsedefaultContentTypebodyPartToInput$fTypeableCGIResultGHC.IOthrowIO$fMonadErrorSomeExceptionCGIT$fMonadTransCGIT$fMonadCGICGIT$fMonadCatchIOCGIT $fMonadIOCGIT $fMonadCGIT $fFunctorCGIT$fTypeableCGITincludestopQuality starOrEqualToqualitycompareSpecificity hasParameter$fAcceptableLanguage$fHeaderValueLanguage $fOrdLanguage $fEqLanguage$fAcceptableContentEncoding$fHeaderValueContentEncoding$fOrdContentEncoding$fEqContentEncoding$fAcceptableCharset$fHeaderValueCharset $fOrdCharset $fEqCharset$fAcceptableContentType$fHeaderValueAcceptghc-prim GHC.TypesTrueshowPair maybeLastgetRequestInputacceptConnectionsaccept'runabortsendBackString GHC.Exception Exception errorPagenetwork-2.3.1.0 Network.URIURI escapePath errorTextrequestHeaderValue getInput_