@@ -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'