postprocess :: Interaction -> STM ()
postprocess itr
- = do res <- readItr itr itrResponse id
+ = do reqM <- readItr itr itrRequest id
+ res <- readItr itr itrResponse id
let sc = resStatus res
when (not $ any (\ p -> p sc) [isSuccessful, isRedirection, isError])
$ abortSTM InternalServerError []
$ Just ("The status code was " ++ show sc ++ " but no Location header.")
- when (itrRequest itr /= Nothing)
+ when (reqM /= Nothing)
$ relyOnRequest itr
-- itrResponse の内容は relyOnRequest によって變へられてゐる可
relyOnRequest :: Interaction -> STM ()
relyOnRequest itr
= do status <- readItr itr itrResponse resStatus
+ req <- readItr itr itrRequest fromJust
- let req = fromJust $ itrRequest itr
- reqVer = reqVersion req
+ let reqVer = reqVersion req
canHaveBody = if reqMethod req == HEAD then
False
else