diff --git a/src/Data/Aeson/Local.hs b/src/Data/Aeson/Local.hs index 1428e05..f3c8e17 100644 --- a/src/Data/Aeson/Local.hs +++ b/src/Data/Aeson/Local.hs @@ -29,6 +29,7 @@ import Prelude import Control.Applicative ((<|>)) import Data.Aeson import Data.Aeson.Types (Parser) +import Data.Maybe (isJust) import Data.Text (Text) import Network.URI @@ -61,7 +62,9 @@ parseHttpsURI t = Nothing -> fail "Invalid absolute URI" Just u -> if uriScheme u == "https:" - then return u + then if isJust $ uriAuthority u + then return u + else fail "URI has empty authority" else fail "URI scheme isn't https" renderURI :: URI -> String