importfeed --relaxed: Avoid hitting the urls of items in the feed.

This commit is contained in:
Joey Hess 2015-08-19 12:24:55 -04:00
parent f30a7ccc42
commit 0f5d6c09ac
7 changed files with 16 additions and 4 deletions

View file

@ -20,6 +20,7 @@ module Utility.Url (
exists,
UrlInfo(..),
getUrlInfo,
assumeUrlExists,
download,
downloadQuiet,
parseURIRelaxed
@ -104,6 +105,9 @@ data UrlInfo = UrlInfo
, urlSuggestedFile :: Maybe FilePath
}
assumeUrlExists :: UrlInfo
assumeUrlExists = UrlInfo True Nothing Nothing
{- Checks that an url exists and could be successfully downloaded,
- also returning its size and suggested filename if available. -}
getUrlInfo :: URLString -> UrlOptions -> IO UrlInfo