- → STM (IO ())
-acceptSemanticallyInvalidRequest ctx itr input
- = do writeTVar (itrState itr) Done
- postprocess itr
- enqueue ctx itr
- return $ acceptRequest ctx input
-
-acceptSemanticallyValidRequest ∷ HandleLike h
- ⇒ Context h
- → Interaction
- → URI
- → Lazy.ByteString
- → IO ()
-acceptSemanticallyValidRequest ctx@(Context {..}) itr uri input
- = do rsrcM ← findResource cResTree cFallbacks uri
- case rsrcM of
- Nothing
- → acceptRequestForNonexistentResource ctx itr input
- Just (rsrcPath, rsrcDef)
- → acceptRequestForExistentResource ctx itr input rsrcPath rsrcDef
-
-acceptRequestForNonexistentResource ∷ HandleLike h
- ⇒ Context h
- → Interaction
- → Lazy.ByteString
- → IO ()
-acceptRequestForNonexistentResource ctx itr input
- = do atomically $
- do setResponseStatus itr NotFound
- writeTVar (itrState itr) Done
- postprocess itr
- enqueue ctx itr
+ → IO ()
+acceptSemanticallyInvalidRequest ctx@(Context {..}) ar input
+ = do sei ← mkSemanticallyInvalidInteraction cConfig ar
+ enqueue ctx sei