Less verbose output from --self-contained.

Now one gets "Fetching [URL]..." for each URL fetched, but not
the full header.
This commit is contained in:
John MacFarlane 2013-05-04 21:53:06 -07:00
parent 008273ef67
commit f63129040b

View file

@ -568,7 +568,8 @@ fetchItem sourceDir s =
-- | Read from a URL and return raw data and maybe mime type.
openURL :: String -> IO (B.ByteString, Maybe String)
openURL u = getBodyAndMimeType `fmap` browse
(do setOutHandler (UTF8.hPutStrLn stderr)
(do S.liftIO $ UTF8.hPutStrLn stderr $ "Fetching " ++ u ++ "..."
setOutHandler $ const (return ())
setAllowRedirects True
request (getRequest' u'))
where getBodyAndMimeType (_, r) = (rspBody r, findHeader HdrContentType r)