on master help sign in
Yielding after sending 100-continue.
8d2e9d4Kazu Yamamoto
warp/Network/Wai/Handler/Warp/Request.hs+4−1
@@ -8,6 +8,7 @@ module Network.Wai.Handler.Warp.Request (
8 ) where
8 ) where
9
9
10import Control.Applicative
10import Control.Applicative
11+import qualified Control.Concurrent as Conc (yield)
11import Control.Exception.Lifted (throwIO)
12import Control.Exception.Lifted (throwIO)
12import Control.Monad.IO.Class (liftIO)
13import Control.Monad.IO.Class (liftIO)
13import Data.Array ((!))
14import Data.Array ((!))
@@ -86,7 +87,9 @@ handleExpect :: Connection
86 -> H.HttpVersion
87 -> H.HttpVersion
87 -> Maybe HeaderValue
88 -> Maybe HeaderValue
88 -> IO ()
89 -> IO ()
89−handleExpect conn ver (Just "100-continue") = connSendAll conn continue
90+handleExpect conn ver (Just "100-continue") = do
91+ connSendAll conn continue
92+ Conc.yield
90 where
93 where
91 continue
94 continue
92 | ver == H.http11 = "HTTP/1.1 100 Continue\r\n\r\n"
95 | ver == H.http11 = "HTTP/1.1 100 Continue\r\n\r\n"