fix parsing webhook response, closes #890 (#894)

This commit is contained in:
Vamshi Surabhi 2018-10-28 22:01:24 +05:30 committed by GitHub
parent 4e08be15d6
commit 58582be644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ import Data.CaseInsensitive (CI (..), original)
import Data.IORef (newIORef)
import qualified Data.ByteString.Lazy as BL
import qualified Data.HashMap.Strict as Map
import qualified Data.String.Conversions as CS
import qualified Data.Text as T
import qualified Network.HTTP.Client as H
@ -147,7 +148,7 @@ mkUserInfoFromResp logger url statusCode respBody
throw500 "Invalid response from authorization hook"
where
getUserInfoFromHdrs rawHeaders = do
let usrVars = mkUserVars rawHeaders
let usrVars = mkUserVars $ Map.toList rawHeaders
case roleFromVars usrVars of
Nothing -> do
logError