@@ -193,7 +193,7 @@ sendResponse conn ii restore req reqidxhdr leftover' response = restore $ do
193193data Rsp = RspFile FilePath (Maybe FilePart) (Maybe HeaderValue) (IO ())
194194 | RspBuilder Builder Bool
195195 | RspSource (forall b. WithSource IO (Flush Builder) b) Bool T.Handle
196− | RspRaw (Source IO ByteString -> Sink ByteString IO () -> IO ()) (Maybe ByteString)
196+ | RspRaw (forall b. WithRawApp b) (Maybe ByteString)
197197
198198----------------------------------------------------------------
199199
@@ -247,8 +247,8 @@ sendRsp conn ver s hs (RspSource withBodyFlush needsChunked th) = withBodyFlush
247247
248248----------------------------------------------------------------
249249
250−sendRsp conn _ _ _ (RspRaw app mbs) =
251− app src sink
250+sendRsp conn _ _ _ (RspRaw withApp mbs) =
251+ withApp $ \app -> app src sink
252252 where
253253 sink = CL.mapM_ (connSendAll conn)
254254 src = do