on master help sign in
fixing modularity.
8264d3cKazu Yamamoto
warp/Network/Wai/Handler/Warp/Request.hs+4
@@ -23,6 +23,10 @@ import Network.Wai.Handler.Warp.ReadInt
23import Network.Wai.Handler.Warp.Types
23import Network.Wai.Handler.Warp.Types
24import Prelude hiding (lines)
24import Prelude hiding (lines)
25
25
26+-- FIXME come up with good values here
27+maxTotalHeaderLength :: Int
28+maxTotalHeaderLength = 50 * 1024
29+
26parseRequest :: Connection -> Port -> SockAddr
30parseRequest :: Connection -> Port -> SockAddr
27 -> Source (ResourceT IO) S.ByteString
31 -> Source (ResourceT IO) S.ByteString
28 -> ResourceT IO (Request, IO (ResumableSource (ResourceT IO) ByteString))
32 -> ResourceT IO (Request, IO (ResumableSource (ResourceT IO) ByteString))
warp/Network/Wai/Handler/Warp/Run.hs+4
@@ -30,6 +30,10 @@ import qualified Control.Concurrent.MVar as MV
30import Network.Socket (withSocketsDo)
30import Network.Socket (withSocketsDo)
31#endif
31#endif
32
32
33+-- FIXME come up with good values here
34+bytesPerRead :: Int
35+bytesPerRead = 4096
36+
33socketConnection :: Socket -> Connection
37socketConnection :: Socket -> Connection
34socketConnection s = Connection
38socketConnection s = Connection
35 { connSendMany = Sock.sendMany s
39 { connSendMany = Sock.sendMany s
warp/Network/Wai/Handler/Warp/Types.hs−5
@@ -14,11 +14,6 @@ warpVersion = showVersion Paths_warp.version
14
14
15type Port = Int
15type Port = Int
16
16
17−-- FIXME come up with good values here
18−bytesPerRead, maxTotalHeaderLength :: Int
19−bytesPerRead = 4096
20−maxTotalHeaderLength = 50 * 1024
21−
22data InvalidRequest =
17data InvalidRequest =
23 NotEnoughLines [String]
18 NotEnoughLines [String]
24 | BadFirstLine String
19 | BadFirstLine String