{-# LANGUAGE DeriveDataTypeable #-}{-# LANGUAGE OverloadedStrings #-}{-# LANGUAGE CPP #-}moduleNetwork.Wai.Handler.Warp.TypeswhereimportControl.ExceptionimportData.ByteString(ByteString)importData.Typeable(Typeable)importData.Version(showVersion)importNetwork.HTTP.Types.HeaderimportqualifiedPaths_warpimportqualifiedNetwork.Wai.Handler.Warp.TimeoutasT#if SENDFILEFDimportqualifiedNetwork.Wai.Handler.Warp.FdCacheasF#endif----------------------------------------------------------------warpVersion::StringwarpVersion=showVersionPaths_warp.version------------------------------------------------------------------ | TCP port numbertypePort=Int----------------------------------------------------------------hTransferEncoding::HeaderNamehTransferEncoding="Transfer-Encoding"hHost::HeaderNamehHost="Host"hServer::HeaderNamehServer="Server"----------------------------------------------------------------dataInvalidRequest=NotEnoughLines[String]|BadFirstLineString|NonHttp|IncompleteHeaders|ConnectionClosedByPeer|OverLargeHeaderderiving(Eq,Show,Typeable)instanceExceptionInvalidRequest------------------------------------------------------------------ |---- In order to provide slowloris protection, Warp provides timeout handlers. We-- follow these rules:---- * A timeout is created when a connection is opened.---- * When all request headers are read, the timeout is tickled.---- * Every time at least 2048 bytes of the request body are read, the timeout-- is tickled.---- * The timeout is paused while executing user code. This will apply to both-- the application itself, and a ResponseSource response. The timeout is-- resumed as soon as we return from user code.---- * Every time data is successfully sent to the client, the timeout is tickled.dataConnection=Connection{connSendMany::[ByteString]->IO(),connSendAll::ByteString->IO(),connSendFile::FilePath->Integer->Integer->IO()->[ByteString]->Cleaner->IO()-- ^ offset, length,connClose::IO(),connRecv::IOByteString}------------------------------------------------------------------ | A dummy @Cleaner@, intended for applications making use of the low-level-- request parsing and rendering functions.---- Since 1.3.4dummyCleaner::Cleaner#if SENDFILEFDdummyCleaner=CleanerT.dummyHandleNothingdataCleaner=Cleaner{threadHandle::T.Handle,fdCacher::MaybeF.MutableFdCache}#elsedummyCleaner=CleanerT.dummyHandlenewtypeCleaner=Cleaner{threadHandle::T.Handle}#endif