]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Interaction.hs
many changes
[Lucu.git] / Network / HTTP / Lucu / Interaction.hs
index ac9c46f5a93b8e8a78c1bcb583f1d712b0c8a374..46e32a139a37d17b88b0dce43e05540dc0cbd79f 100644 (file)
@@ -23,6 +23,7 @@ import Data.Ascii (Ascii)
 import qualified Data.ByteString as BS
 import Data.Sequence (Seq)
 import qualified Data.Sequence as S
+import Data.Text (Text)
 import Network.Socket
 import Network.HTTP.Lucu.Config
 import Network.HTTP.Lucu.Headers
@@ -36,7 +37,7 @@ data Interaction = Interaction {
     , itrLocalPort         ∷ !PortNumber
     , itrRemoteAddr        ∷ !SockAddr
     , itrRemoteCert        ∷ !(Maybe X509)
-    , itrResourcePath      ∷ !(Maybe [Ascii])
+    , itrResourcePath      ∷ !(Maybe [Text])
     , itrRequest           ∷ !(TVar (Maybe Request))
     , itrResponse          ∷ !(TVar Response)
 
@@ -58,7 +59,7 @@ data Interaction = Interaction {
     , itrWillClose         ∷ !(TVar Bool)
 
     , itrBodyToSend        ∷ !(TMVar Builder)
-    , itrBodyIsNull        ∷ !(TVar Bool)
+    , itrSentNoBody        ∷ !(TVar Bool)
 
     , itrState             ∷ !(TVar InteractionState)
 
@@ -110,7 +111,7 @@ newInteraction !conf !port !addr !cert !req
          willClose         ← newTVarIO False
 
          bodyToSend ← newEmptyTMVarIO
-         bodyIsNull ← newTVarIO True -- 一度でも bodyToSend が空でなくなったら False
+         sentNoBody ← newTVarIO True -- 一度でも bodyToSend が空でなくなったら False
 
          state ← newTVarIO ExaminingRequest
 
@@ -144,7 +145,7 @@ newInteraction !conf !port !addr !cert !req
                     , itrWillClose         = willClose
 
                     , itrBodyToSend = bodyToSend
-                    , itrBodyIsNull = bodyIsNull
+                    , itrSentNoBody = sentNoBody
                     
                     , itrState = state