ա      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~SafeNoneout fd (i.e. the socket)in fd (i.e. the file)offset in bytescount in bytesNoneOTzEither the server should start listening on the given interface / port combination, or the server should start up with a  that has already had bind() and listen() called on it.A C is called if the user handler requests that a file be sent using  sendfile(); on systems that support it (Linux, Mac OSX, and FreeBSD).fThis function, provided to the web server internals from the outside, is responsible for producing a ! once the server has parsed the .CAll of the things a session needs to service a single HTTP request. |If the bool stored in this IORef becomes true, the server will close the connection after the current request is processed. 3An IO action to modify the current request timeout. The value stored in this IORef is True if this request is the first on a new connection, and False if it is a subsequent keep-alive request. (The function called when we want to use  sendfile().'The server's idea of its local address.The listening port number.The address of the remote user.The remote user's port.&The read end of the socket connection.'The write end of the socket connection.8Data and services that all HTTP response handlers share.will be overridden by a Host header if it appears.! Number of accept loops to spawn."The "N is called if the user handler escapes the HTTP session, e.g. for websockets.#The # is called if an exception reaches the toplevel of the server, i.e. if an exception leaks out of the user handler or if an exception is raised during the sending of the HTTP response data.$The $Q is called once the server has finished sending the HTTP response to the client.%The % is called once the user handler has finished running, but before the data for the HTTP response starts being sent to the client.&The &m is called after the HTTP Request has been parsed by the server, but before the user handler starts running.'The ' is called once processing for an HTTP request begins, i.e. after the connection has been accepted and we know that there's data available to read from the socket. The IORef passed to the hook initially contains a bottom value that will throw an exception if evaluated.(builder bufferstatus line and headers file to send start offsetnumber of bytesglobal server configper-connection dataHTTP request object  !"#$%&'(   !"#$%&'( ! $"#&'%    !"#$%&' None0T    Trustworthy0BOT:an internal version of the headers part of an HTTP requestTA version of elemIndex that doesn't allocate a Maybe. (It returns -1 on not found.),$ None None0T(Arguments passed to s.,;A record type which represents partial configurations (for  httpServe&) by wrapping all of its fields in a 7. Values of this type are usually constructed via its " instance by doing something like: setPort 1234 mempty(Any fields which are unspecified in the , passed to  httpServe@ (and this is the norm) are filled in with default values from K.B<Data type representing the configuration of a logging targetC no loggingDlog to text fileElog custom IO handlerFFIXME/Note: this type changed in snap-server 1.0.0.0.JReturns a completely empty ,. Equivalent to  from Config's  instance.K,These are the default values for the optionsLLThe hostname of the HTTP server. This field has the same format as an HTTP Host header; if a Hostr header came in with the request, we use that, otherwise we default to this value specified in the configuration.MPath to the access logNPath to the error logOCGets the locale to use. Locales are used on Unix only, to set the LANG/LC_ALLD/etc. environment variable. For instance if you set the locale to "en_US5", we'll set the relevant environment variables to " en_US.UTF-8".P(Returns the port to listen on (for http)Q)Returns the address to bind to (for http)R)Returns the port to listen on (for https)S*Returns the address to bind to (for https)T Path to the SSL certificate fileU Path to the SSL certificate fileVPath to the SSL key fileWPFile path to unix socket. Must be absolute path, but allows for symbolic links.X)Access mode for unix socket, by default is system specific. This should only be used to grant additional permissions to created socket file, and not to remove permissions set by default. The only portable way to limit access to socket is creating it in a directory with proper permissions set.;Most BSD systems ignore access permissions on unix sockets.Note: This uses umask. There is a race condition if process creates other files at the same time as opening a unix socket with this option set.Y@If set and set to True, compression is turned on when applicableZ0Whether to write server status updates to stderr['A MonadSnap action to handle 500 errors_|A startup hook is run after the server initializes but before user request processing begins. The server passes, through a (R object, the startup hook a list of the sockets it is listening on and the final ,1 object completed after command-line processing.uThe *s opened by the server. There will be two *s for SSL connections, and one otherwise.zNReturns a description of the snap command line options suitable for use with System.Console.GetOpt.{ Returns a ,E obtained from parsing command-line options, using the default Snap   set.-On Unix systems, the locale is read from the LANG environment variable.| Returns a ,E obtained from parsing command-line options, using the default Snap  b set as well as a list of user OptDescrs. User OptDescrs use the "other" field (accessible using ] and qm) to store additional command-line option state. These are combined using a user-defined combining function.-On Unix systems, the locale is read from the LANG environment variable._()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy  zthe configuration defaults. {.default configuration. This is combined with Kv to obtain default values to use if the given parameter is specified on the command line. Usually it is fine to use J here.| User options.[State for multiple invoked user command-line options will be combined using this function.5default configuration. This is combined with Snap's Kw to obtain default values to use if the given parameter is specified on the command line. Usually it is fine to use J here. }~V()*+,-32./01456789:;<=>?@ABCDEFGIHJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}VBCDE,-./0123456789:;<=>?@AFGHIJK{|yz}MQY\[NLO]P^STUVRZ_WXaempob`cqdrghijfnkls()*+uvtwxA()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy  z {| }~ Safe None0INone0  !  !NoneOT"#mock setSocketOption bindSocketlisten$%& bound socket' bound socket( bound socket)"#$&'()"#$%&'()None-"#$%&'-$"#&'%None-Configure Snap in direct / non-proxying mode.Assert that Snap is running behind an HTTP proxy, and that the proxied connection information will be stored in the "X-Forwarded-For" or "Forwarded-For" HTTP headers.NAssert that Snap is running behind a proxy running the HaProxy protocol (see  9http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txtM). In this mode connections that don't obey the proxy protocol are rejected.;(,BCDEFJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsuvyz{|};,BCDEFJK{|yz}MQY\[NLO]P^STVURZ_WXaempob`cqdrghjifnkls(uvSafe *+,-./0123456+123456 *+,-./0123456NoneBOT7Sparks off a new thread using 8\ to run the given IO computation, but first labels the thread with the given label (using  labelThreadBs).The implementation makes sure that asynchronous exceptions are masked until the given computation is executed. This ensures the thread will always be labeled which guarantees you can always easily find it in the GHC event log.Like 8, the given computation is given a function to unmask asynchronous exceptions. See the documentation of that function for the motivation. Returns the 9 of the newly created thread.:Like 7N, but lets you specify on which capability (think CPU) the thread should run.;Label the current thread.7Latin-1 encoded label:Latin-1 encoded label Capability;7:7:;NoneOT <=>?@ thread label capability0user thread action, taking a restore functionA thread label0user thread action, taking a restore functionBCDEFG<@ABCDE <=>?@ABCDEFGNoneOTHGiven a Id value and the current time, apply the given modification function to the amount of time remaining.JCreate a new TimeoutManager.KStop a TimeoutManager.L.Register a new thread with the TimeoutManager.MTickle the timeout on a connection to be at least N seconds into the future. If the existing timeout is set for M seconds from now, where M > N, then the timeout is unaffected.N@Set the timeout on a connection to be N seconds into the future.O+Modify the timeout with the given function.PCancel a timeout.QRSTUVWXYZ[\]I^_HJdefault timeout poll intervalfunction to get current timeK`Lmanager to register with thread labelthread action to runMNOPab QYJKLMNOPQRSTUVWXYZ[\]I^_HJK`LMNOPabNone0OTcFor each cpu, we store: * An accept thread * A TimeoutManager * An mvar to signal when the timeout thread is shutdowndThe main Snap webserver loop. Given a server handler, configuration, and a function to accept new connections, runs an HTTP loop forever over N threads, until a ThreadKilled exception is received.eConvert f into g for output.chijklmnopqrdserver handler server configaccept functionstuvwxyz{|}e~ klmnopqdschijklmnopqrdstuvwxyz{|}e~v4NoneOT Holds the state for a logger.Creates a new logger, logging to the given file. If the file argument is "-", then log to stdout; if it's "stderr" then we log to stderr, otherwise we log to a regular file in append mode. The file is closed and re-opened every 15 minutes to facilitate external log rotation.Like , but uses a custom error action if the logger needs to print an error message of its own (for instance, if it can't open the output file.)bCreates a Logger and passes it into the given function, cleaning up with "stopLogger" afterwards.Creates a Logger with "newLoggerWithCustomErrorFunction" and passes it into the given function, cleaning up with "stopLogger" afterwards./Prepares a log message with the time prepended.,Prepares a log message in "combined" format.Sends out a log message verbatim with a newline appended. Note: if you want a fancy log message you'll have to format it yourself (or use ).PKills a logger thread, causing any unwritten contents to be flushed out to disklog file to use=logger uses this action to log any error messages of its ownlog file to uselog file to use=logger uses this action to log any error messages of its ownlog file to use remote host remote userArequest line (up to you to ensure there are no quotes in here) status codenum bytes sent<referer (up to you to ensure there are no quotes in here)?user agent (up to you to ensure there are no quotes in here) NoneT1A short string describing the Snap server versionStarts serving HTTP requests using the given handler. This function never returns; to shut down the HTTP server, kill the controlling thread.This function is like N except it doesn't setup compression, reverse proxy address translation (via 9), or the error handler; this allows it to be used from .NStarts serving HTTP requests using the given handler, with settings from the ,d passed in. This function never returns; to shut down the HTTP server, kill the controlling thread.Starts serving HTTP using the given handler. The configuration is read from the options given on the command-line, as returned by {Z. This function never returns; to shut down the HTTP server, kill the controlling thread.bGiven a string like "en_US", this sets the locale to "en_US.UTF-8". This doesn't work on Windows. server handler server configlistening server backendsA(,BCDEFJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsuvyz{|}  !"#$%&''()*+,-./0123456789::;<==>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~l                           !"# $ % & ' ( )**+,-./0123456789:;<=>?@ABCDEFGHIHJKLMMNOPQRSTUVWXYZ[\]^_R``1abcdeffghijklmnopqrstuovwxxyyzz{|}~  *snap-server-1.0.3.2-3NiNJwzLiAh2ISaWjlUzhVSnap.Internal.Http.Server.Types Snap.Internal.Http.Server.ConfigSnap.Http.Server.TypesSnap.Http.Server.ConfigSystem.FastLoggerSnap.Http.ServerSystem.SendFile.LinuxSystem.SendFileSnap.Internal.Http.Server.TLS Snap.Internal.Http.Server.ParserSnap.Internal.Http.Server.Date Snap.Internal.Http.Server.CommonSnap.Internal.Http.Server.Clock!Snap.Internal.Http.Server.Address Snap.Internal.Http.Server.SocketPaths_snap_serverControl.Concurrent.Extended Snap.Internal.Http.Server.Thread(Snap.Internal.Http.Server.TimeoutManager!Snap.Internal.Http.Server.Session SocketConfigStartListeningPreBoundSendFileHandler ServerHandler AcceptFunc runAcceptFuncPerSessionData_forceConnectionClose_twiddleTimeout_isNewConnection_sendfileHandler _localAddress _localPort_remoteAddress _remotePort_readEnd _writeEnd ServerConfig _logAccess _logError _onNewRequest_onParse_onUserHandlerFinished_onDataFinished _onException _onEscape_localHostname_defaultTimeout _isSecure_numAcceptLoopsEscapeSnapHook ExceptionHookDataFinishedHookUserHandlerFinishedHook ParseHookNewRequestHook StartupInfostartupHookConfigstartupHookSocketsConfighostname accessLogerrorLoglocaleportbindsslportsslbindsslcert sslchaincertsslkey unixsocketunixaccessmode compressionverbose errorHandlerdefaultTimeoutother proxyType startupHook ConfigLog ConfigNoLog ConfigFileLog ConfigIoLog ProxyTypeNoProxyHaProxyX_Forwarded_For emptyConfig defaultConfig getHostname getAccessLog getErrorLog getLocalegetPortgetBind getSSLPort getSSLBind getSSLCertgetSSLChainCert getSSLKey getUnixSocketgetUnixSocketAccessModegetCompression getVerbosegetErrorHandlergetDefaultTimeoutgetOther getProxyTypegetStartupHook setHostname setAccessLog setErrorLog setLocalesetPortsetBind setSSLPort setSSLBind setSSLCertsetSSLChainCert setSSLKey setUnixSocketsetUnixSocketAccessModesetCompression setVerbosesetErrorHandlersetDefaultTimeoutsetOther setProxyTypesetStartupHookemptyStartupInfogetStartupSocketsgetStartupConfigsetStartupSocketssetStartupConfigcompleteConfig optDescrscommandLineConfigextendedCommandLineConfigfmapOpt$fMonoidConfig $fShowConfig$fShowConfigLog$fShowProxyType $fEqProxyTypeemptyServerConfig getLogAccess getLogErrorgetOnNewRequest getOnParsegetOnUserHandlerFinishedgetOnDataFinishedgetOnException getOnEscapegetLocalHostname getIsSecuregetNumAcceptLoops setLogAccess setLogErrorsetOnNewRequest setOnParsesetOnUserHandlerFinishedsetOnDataFinishedsetOnException setOnEscapesetLocalHostname setIsSecuresetNumAcceptLoopsgetTwiddleTimeoutisNewConnectiongetLocalAddress getLocalPortgetRemoteAddress getRemotePortnoProxy xForwardedForhaProxyLogger newLogger newLoggerWithCustomErrorFunction withLogger!withLoggerWithCustomErrorFunctiontimestampedLogEntrycombinedLogEntrylogMsg stopLoggersnapServerVersion rawHttpServesimpleHttpServe httpServequickHttpServesetUnicodeLocale c_sendfilesendFile sendFileImplsendfile sendFileModec_send sendHeaderssendHeadersImpl&network-2.6.3.2-IsLM4TXcLoRI0fmmBYVyQzNetwork.Socket.TypesSocket(snap-core-1.0.3.1-83GVULozdOI8O6U4UgnvWKSnap.Internal.Http.TypesResponseRequestSSL SSLContext TLSExceptionsslNotSupportedExceptionwithTLSbarf bindHttpshttpsAcceptFunc sendFileFunc$fExceptionTLSExceptionIRequest elemIndexHttpParseExceptioniMethod iRequestUri iHttpVersioniRequestHeaders iStdHeadersMStandardHeadersStandardHeaderscontentLengthTaghostTagtransferEncodingTag cookieTagcontentTypeTag connectionTagnStandardHeadersfindStdHeaderIndexgetStdContentLength getStdHostgetStdTransferEncoding getStdCookiegetStdContentTypegetStdConnectionnewMStandardHeaders parseRequestpLinesplitChbreakCh splitHeaderisLWSpHeadersmethodFromStringreadChunkedTransferEncodingwriteChunkedTransferEncodingmAX_CHUNK_SIZEpGetTransferChunktoLower$fExceptionHttpParseException$fShowIRequest $fEqIRequest)io-streams-1.5.0.1-KB7DoF6ajnyJxQBmkrkJ8A'System.IO.Streams.Attoparsec.ByteStringparseFromStreamSnap.Internal.Parsing parseCookieparseUrlEncoded DateState_cachedDateString_cachedLogString_lastFetchTime dateState fetchTime updateStateensureFreshDate getDateStringgetLogDateStringbaseGHC.BaseMaybeMonoidmemptySystem.Console.GetOptOptDescr bsFromStringtoStringdefaultErrorHandlerfmapArgrequestErrorMessagefromShow eatException Data.IORefatomicModifyIORef' ClockTimesleepFor sleepSecs getClockTimefromSecstoSecsAddressNotSupportedException getHostAddrgetHostAddrImpl getAddressgetAddressImpl getSockAddrgetSockAddrImpl'$fExceptionAddressNotSupportedException"$fShowAddressNotSupportedException bindSocketbindSocketImplbindUnixSocketbUFSIZacceptAndInitializehaProxyAcceptFunchttpAcceptFunccatchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameforkIOLabeledWithUnmaskBs GHC.Conc.SyncforkIOWithUnmaskThreadIdforkOnLabeledWithUnmaskBslabelMe SnapThread _snapThreadId_snapThreadFinishedforkOnforkcancelwait cancelAndWait isFinished wrapAction$fShowSnapThreadsmapState initializestopregisterticklesetmodifyTimeoutManager _pollInterval_getTime_threads _morePlease_managerThread TimeoutThread_thread_state _hGetTimecanceled isCanceledwakeup managerThread$fShowTimeoutThread EventLoopCpuhttpAcceptLoop cookieToBSCookiebytestring-0.10.8.1Data.ByteString.Internal ByteString _acceptThread_timeoutManagerLengthRequiredExceptionBadRequestExceptionTerminateSessionExceptionsnapToServerHandlermAX_HEADERS_SIZE httpSession mkHeaderLine mkHeaderPrim<+> headersToPrimcpBScrlfPoke sERVER_HEADERterminateSession renderCookies"$fExceptionLengthRequiredException$fExceptionBadRequestException$$fExceptionTerminateSessionException_queuedMessages _dataWaiting _loggerPath_loggingThread _errAction loggingThreadSnap.Util.Proxy behindProxySnap.Internal.Core MonadSnap listenerscatch500compressbshow