Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
ce5bb26e
Commit
ce5bb26e
authored
9 years ago
by
Oleg Grenrus
Browse files
Options
Downloads
Patches
Plain Diff
maybeDecompress: bail on all errors at the beginning of the stream with zlib < 0.6
parent
8da8e665
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cabal-install/Distribution/Client/GZipUtils.hs
+1
-1
1 addition, 1 deletion
cabal-install/Distribution/Client/GZipUtils.hs
cabal-install/tests/UnitTests/Distribution/Client/GZipUtils.hs
+0
-3
0 additions, 3 deletions
...-install/tests/UnitTests/Distribution/Client/GZipUtils.hs
with
1 addition
and
4 deletions
cabal-install/Distribution/Client/GZipUtils.hs
+
1
−
1
View file @
ce5bb26e
...
...
@@ -77,7 +77,7 @@ maybeDecompress bytes = foldStream $ decompressWithErrors gzipOrZlibFormat defau
-- Returning it as-is.
-- TODO: alternatively, we might consider looking for the two magic bytes
-- at the beginning of the gzip header.
foldStream
(
StreamError
DataError
_
)
=
bytes
foldStream
(
StreamError
_
_
)
=
bytes
foldStream
somethingElse
=
doFold
somethingElse
doFold
StreamEnd
=
BS
.
Empty
...
...
This diff is collapsed.
Click to expand it.
cabal-install/tests/UnitTests/Distribution/Client/GZipUtils.hs
+
0
−
3
View file @
ce5bb26e
{-# LANGUAGE CPP #-}
module
UnitTests.Distribution.Client.GZipUtils
(
tests
)
where
...
...
@@ -21,9 +20,7 @@ import Test.Tasty.QuickCheck
tests
::
[
TestTree
]
tests
=
[
testCase
"maybeDecompress"
maybeDecompressUnitTest
#
if
MIN_VERSION_zlib
(
0
,
6
,
0
)
,
testProperty
"decompress plain"
prop_maybeDecompress_plain
#
endif
,
testProperty
"decompress zlib"
prop_maybeDecompress_zlib
,
testProperty
"decompress gzip"
prop_maybeDecompress_gzip
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment