@@ -225,8 +225,8 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
225 internalError = responseLBS H.internalServerError500 [(H.hContentType, "text/plain")] "Something went wrong"
225 internalError = responseLBS H.internalServerError500 [(H.hContentType, "text/plain")] "Something went wrong"
227 recvSendLoop fromClient = do
227 recvSendLoop fromClient = do
228− (env, idxhdr, getSource) <- recvRequest conn timeoutHandle remoteHost' fromClient
228+ (req, idxhdr, getSource) <- recvRequest conn timeoutHandle remoteHost' fromClient
229− case settingsIntercept settings env of
229+ case settingsIntercept settings req of
230 Nothing -> do
230 Nothing -> do
231 -- Let the application run for as long as it wants
231 -- Let the application run for as long as it wants
232 liftIO $ T.pause th
232 liftIO $ T.pause th
@@ -235,9 +235,9 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
235 -- creating the request, we need to make sure that we don't get
235 -- creating the request, we need to make sure that we don't get
236 -- an async exception before calling the ResponseSource.
236 -- an async exception before calling the ResponseSource.
237 keepAlive <- mask $ \restore -> do
237 keepAlive <- mask $ \restore -> do
238− res <- restore $ app env
238+ res <- restore $ app req
239 liftIO $ T.resume th
239 liftIO $ T.resume th
240− sendResponse conn ii restore env idxhdr res
240+ sendResponse conn ii restore req idxhdr res
242 -- We just send a Response and it takes a time to
242 -- We just send a Response and it takes a time to
243 -- receive a Request again. If we immediately call recv,
243 -- receive a Request again. If we immediately call recv,
@@ -249,7 +249,7 @@ serveConnection timeoutHandle settings ii app conn remoteHost' =
249 -- the number of cores is small.
249 -- the number of cores is small.
250 Conc.yield
250 Conc.yield
251 -- flush the rest of the request body
251 -- flush the rest of the request body
252− requestBody env $$ CL.sinkNull
252+ requestBody req $$ CL.sinkNull
253 ResumableSource fromClient' _ <- liftIO getSource
253 ResumableSource fromClient' _ <- liftIO getSource
255 when keepAlive $ recvSendLoop fromClient'
255 when keepAlive $ recvSendLoop fromClient'