]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Resource/Tree.hs
Still making many changes...
[Lucu.git] / Network / HTTP / Lucu / Resource / Tree.hs
index 7f816e8feabb667139db9c1d903eacaa53e4a152..17827d12369d4eb950220ff48be0dd0cbde6d8ba 100644 (file)
@@ -295,8 +295,16 @@ runResource (ResourceDef {..}) itr@(Interaction {..})
                        do setStatus $ aboStatus abo
                           setHeader "Content-Type" defaultPageContentType
                           mapM_ (uncurry setHeader) $ fromHeaders $ aboHeaders abo
-                          output $ LT.encodeUtf8 $ abortPage itrConfig itrRequest res abo
+                          putChunk $ LT.encodeUtf8 $ abortPage itrConfig itrRequest res abo
                else
                    when (cnfDumpTooLateAbortionToStderr itrConfig)
-                       $ hPutStrLn stderr $ show abo
+                       $ dumpAbortion abo
                runRes (driftTo Done) itr
+
+dumpAbortion ∷ Abortion → IO ()
+dumpAbortion abo
+    = hPutStr stderr
+      $ concat [ "Lucu: an exception occured after "
+               , "sending response header to the client:\n"
+               , "  ", show abo, "\n"
+               ]