Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
c9a77353
Commit
c9a77353
authored
Jul 27, 2014
by
Mikhail Glushenkov
Browse files
Revert "Print a more friendly message when http_proxy is down."
This reverts commit
03c134d5
. Committed by mistake.
parent
eb2bf08e
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/HttpUtils.hs
View file @
c9a77353
...
...
@@ -21,10 +21,8 @@ import Network.Browser
,
setOutHandler
,
setErrHandler
,
setProxy
,
setAuthorityGen
,
request
)
import
Network.Stream
(
Result
,
ConnError
(
..
)
)
import
Control.Exception
(
handleJust
)
import
Control.Monad
(
liftM
,
guard
)
(
liftM
)
import
qualified
Data.ByteString.Lazy.Char8
as
ByteString
import
Data.ByteString.Lazy
(
ByteString
)
...
...
@@ -44,8 +42,6 @@ import System.FilePath
(
(
<.>
)
)
import
System.Directory
(
doesFileExist
)
import
System.IO.Error
(
isDoesNotExistError
)
data
DownloadResult
=
FileAlreadyInCache
|
FileDownloaded
FilePath
deriving
(
Eq
)
...
...
@@ -92,16 +88,13 @@ cabalBrowse :: Verbosity
->
IO
a
cabalBrowse
verbosity
auth
act
=
do
p
<-
proxy
verbosity
handleJust
(
guard
.
isDoesNotExistError
)
(
const
$
die
"Cannot connect to uri. Is http_proxy set?"
)
$
browse
$
do
setProxy
p
setErrHandler
(
warn
verbosity
.
(
"http error: "
++
))
setOutHandler
(
debug
verbosity
)
auth
setAuthorityGen
(
\
_
_
->
return
Nothing
)
act
browse
$
do
setProxy
p
setErrHandler
(
warn
verbosity
.
(
"http error: "
++
))
setOutHandler
(
debug
verbosity
)
auth
setAuthorityGen
(
\
_
_
->
return
Nothing
)
act
downloadURI
::
Verbosity
->
URI
-- ^ What to download
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment