import Control.Monad.Unicode
import Data.Ascii (Ascii, CIAscii, AsciiBuilder)
import Data.Convertible.Base
-import Data.Eq.Indirect
import Data.Maybe
import Data.Monoid.Unicode
import GHC.Conc (unsafeIOToSTM)
import Network.HTTP.Lucu.Interaction
import Network.HTTP.Lucu.Request
import Network.HTTP.Lucu.Response
+import Network.HTTP.Lucu.Response.StatusCode
import Prelude.Unicode
postprocess ∷ NormalInteraction → STM ()
$ cs ("Inappropriate status code for a response: " ∷ Ascii)
⊕ cs resStatus
- when ( resStatus ≡: MethodNotAllowed ∧
- (¬) (hasHeader "Allow" res) )
+ when ( resStatus ≡ cs MethodNotAllowed ∧
+ (¬) (hasHeader "Allow" res) )
$ abort'
$ cs ("The status was " ∷ Ascii)
⊕ cs resStatus
⊕ cs (" but no \"Allow\" header." ∷ Ascii)
- when ( resStatus ≢: NotModified ∧
+ when ( resStatus ≢ cs NotModified ∧
isRedirection resStatus ∧
(¬) (hasHeader "Location" res) )
$ abort'