acceptRequestForExistentResource :: Interaction -> ByteString -> ResourceDef -> STM (IO ())
acceptRequestForExistentResource itr input rsrcDef
= do requestHasBody <- readItr itr itrRequestHasBody id
- writeItr itr itrState (if requestHasBody
- then ExaminingHeader
- else DecidingHeader)
enqueue itr
return $ do runResource rsrcDef itr
if requestHasBody then