- $ abortSTM InternalServerError []
- $ Just ("The status code is not good for a final status: "
- ++ show sc)
-
- when (sc ≡ MethodNotAllowed ∧ getHeader (C8.pack "Allow") res ≡ Nothing)
- $ abortSTM InternalServerError []
- $ Just ("The status was " ++ show sc ++ " but no Allow header.")
-
- when (sc /= NotModified ∧ isRedirection sc ∧ getHeader (C8.pack "Location") res ≡ Nothing)
- $ abortSTM InternalServerError []
- $ Just ("The status code was " ++ show sc ++ " but no Location header.")
-
- when (reqM /= Nothing) relyOnRequest
+ $ abortSTM InternalServerError []
+ $ Just
+ $ A.toText
+ $ A.fromAsciiBuilder
+ $ A.toAsciiBuilder "The status code is not good for a final status of a response: "
+ ⊕ printStatusCode sc
+
+ when (sc ≡ MethodNotAllowed ∧ getHeader "Allow" res ≡ Nothing)
+ $ abortSTM InternalServerError []
+ $ Just
+ $ A.toText
+ $ A.fromAsciiBuilder
+ $ A.toAsciiBuilder "The status was "
+ ⊕ printStatusCode sc
+ ⊕ A.toAsciiBuilder " but no Allow header."
+
+ when (sc ≢ NotModified ∧ isRedirection sc ∧ getHeader "Location" res ≡ Nothing)
+ $ abortSTM InternalServerError []
+ $ Just
+ $ A.toText
+ $ A.fromAsciiBuilder
+ $ A.toAsciiBuilder "The status code was "
+ ⊕ printStatusCode sc
+ ⊕ A.toAsciiBuilder " but no Location header."
+
+ when (reqM ≢ Nothing) relyOnRequest