Skip to content
GitLab
Menu
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
bb14b56d
Commit
bb14b56d
authored
Aug 10, 2008
by
David Himmelstrup
Browse files
Print upload error messages if they are in text/plain.
parent
822c4bb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Upload.hs
View file @
bb14b56d
...
...
@@ -20,7 +20,7 @@ import Network.Browser
,
Authority
(
..
),
addAuthority
,
setAuthorityGen
,
setOutHandler
,
setErrHandler
,
setProxy
)
import
Network.HTTP
(
Header
(
..
),
HeaderName
(
..
)
(
Header
(
..
),
HeaderName
(
..
)
,
findHeader
,
Request
(
..
),
RequestMethod
(
..
),
Response
(
..
)
)
import
Network.URI
(
URI
(
uriPath
),
parseURI
)
...
...
@@ -123,7 +123,9 @@ handlePackage verbosity uri auth path =
(
x
,
y
,
z
)
->
do
notice
verbosity
$
"ERROR: "
++
path
++
": "
++
map
intToDigit
[
x
,
y
,
z
]
++
" "
++
rspReason
resp
debug
verbosity
$
rspBody
resp
case
findHeader
HdrContentType
resp
of
Just
"text/plain"
->
notice
verbosity
$
rspBody
resp
_
->
debug
verbosity
$
rspBody
resp
mkRequest
::
URI
->
FilePath
->
IO
Request
mkRequest
uri
path
=
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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