X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FPostprocess.hs;h=260bbcc6bdffb3d42efaad0a2560f88c3d719878;hp=7d7e147f93be84797d739ca976991a4954ea5929;hb=a44a96d95b5fcbaf24a21c0336046ce0c3bab614;hpb=c6b11025d1f81c668e9995e856b7bb34175230d3 diff --git a/Network/HTTP/Lucu/Postprocess.hs b/Network/HTTP/Lucu/Postprocess.hs index 7d7e147..260bbcc 100644 --- a/Network/HTTP/Lucu/Postprocess.hs +++ b/Network/HTTP/Lucu/Postprocess.hs @@ -71,16 +71,16 @@ postprocess itr when (not $ any (\ p -> p sc) [isSuccessful, isRedirection, isError]) $ abortSTM InternalServerError [] - ("The status code is not good for a final status: " - ++ show sc) + $ Just ("The status code is not good for a final status: " + ++ show sc) when (sc == MethodNotAllowed && getHeader "Allow" res == Nothing) $ abortSTM InternalServerError [] - ("The status was " ++ show sc ++ " but no Allow header.") + $ Just ("The status was " ++ show sc ++ " but no Allow header.") when (sc /= NotModified && isRedirection sc && getHeader "Location" res == Nothing) $ abortSTM InternalServerError [] - ("The status code was " ++ show sc ++ " but no Location header.") + $ Just ("The status code was " ++ show sc ++ " but no Location header.") when (itrRequest itr /= Nothing) $ relyOnRequest itr @@ -117,9 +117,9 @@ postprocess itr in when (teList == [] || last teList /= "chunked") $ abortSTM InternalServerError [] - ("Transfer-Encoding must end with `chunked' " - ++ "because this is an HTTP/1.1 request: " - ++ te) + $ Just ("Transfer-Encoding must end with `chunked' " + ++ "because this is an HTTP/1.1 request: " + ++ te) writeItr itr itrWillChunkBody True else @@ -127,7 +127,7 @@ postprocess itr Nothing -> return () Just "identity" -> return () Just te -> abortSTM InternalServerError [] - ("Transfer-Encoding must be `identity' because " + $ Just ("Transfer-Encoding must be `identity' because " ++ "this is an HTTP/1.0 request: " ++ te)