add UrlOptions sum type

This commit is contained in:
Joey Hess 2014-02-24 22:00:25 -04:00
parent fdc7200b25
commit 003fc2b7e1
Failed to extract signature
14 changed files with 78 additions and 65 deletions

View file

@ -121,10 +121,10 @@ findDownloads u = go =<< downloadFeed u
downloadFeed :: URLString -> Annex (Maybe Feed)
downloadFeed url = do
showOutput
ua <- Url.getUserAgent
uo <- Url.getUrlOptions
liftIO $ withTmpFile "feed" $ \f h -> do
fileEncoding h
ifM (Url.download url [] [] f ua)
ifM (Url.download url f uo)
( parseFeedString <$> hGetContentsStrict h
, return Nothing
)