on master help sign in
proper name.
commitecbe770b9497bea9c481c24a457992f27f20928b authorKazu Yamamoto <kazu@iij.ad.jp> dateWed 30 Oct 2013, 13:40 (13 years ago) parent06b54e2
1 file changed+5−5
warp/Network/Wai/Handler/Warp/Run.hs+5−5
warp/Network/Wai/Handler/Warp/Run.hs+5−5
@@ -225,8 +225,8 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
225225 internalError = responseLBS H.internalServerError500 [(H.hContentType, "text/plain")] "Something went wrong"
226226
227227 recvSendLoop fromClient = do
228− (env, idxhdr, getSource) <- recvRequest conn timeoutHandle remoteHost' fromClient
229− case settingsIntercept settings env of
228+ (req, idxhdr, getSource) <- recvRequest conn timeoutHandle remoteHost' fromClient
229+ case settingsIntercept settings req of
230230 Nothing -> do
231231 -- Let the application run for as long as it wants
232232 liftIO $ T.pause th
@@ -235,9 +235,9 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
235235 -- creating the request, we need to make sure that we don't get
236236 -- an async exception before calling the ResponseSource.
237237 keepAlive <- mask $ \restore -> do
238− res <- restore $ app env
238+ res <- restore $ app req
239239 liftIO $ T.resume th
240− sendResponse conn ii restore env idxhdr res
240+ sendResponse conn ii restore req idxhdr res
241241
242242 -- We just send a Response and it takes a time to
243243 -- receive a Request again. If we immediately call recv,
@@ -249,7 +249,7 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
249249 -- the number of cores is small.
250250 Conc.yield
251251 -- flush the rest of the request body
252− requestBody env $$ CL.sinkNull
252+ requestBody req $$ CL.sinkNull
253253 ResumableSource fromClient' _ <- liftIO getSource
254254
255255 when keepAlive $ recvSendLoop fromClient'