]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Preprocess.hs
"driftTo Done" was trying to change the response header, which is impossible.
[Lucu.git] / Network / HTTP / Lucu / Preprocess.hs
index 1c11f89784cb622ec6ee5fae0e67c7acd666c9c1..802338c46dddbf7df1fb9fbe06c25620f5aa6075 100644 (file)
@@ -1,5 +1,6 @@
+-- #hide
 module Network.HTTP.Lucu.Preprocess
-    ( preprocess -- Interaction -> STM ()
+    ( preprocess
     )
     where
 
@@ -77,11 +78,10 @@ preprocess itr
                 mapM_ (preprocessHeader itr) (reqHeaders req)
     where
       setStatus itr status
-          = writeItr itr itrResponse $ Just (Response {
-                                               resVersion = HttpVersion 1 1
-                                             , resStatus  = status
-                                             , resHeaders = []
-                                             })
+          = updateItr itr itrResponse
+            $ \ res -> res {
+                         resStatus = status
+                       }
 
       preprocessHeader itr (name, value)
           = case map toLower name of