GitHub user eiri opened a pull request:

    https://github.com/apache/couchdb-couch/pull/169

    Raise better exception on attempt to decompress corrupt binary

    Right now when a binary without compression prefix passed on 
`couch_compress:decompress/1` (for example if a database file got corrupted), 
the module throws `function_clause` exception.
    
    This patch adds tests for `couch_compress` module and makes `decompress/1` 
and `is_compressed/2` functions to raise `invalid_compression` error when they 
can't detect compression of passed binary.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch 
65288-better-error-on-invalid-decompress

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/169.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #169
    
----
commit 21b2847db6c50db1a5bc25406e34084f8c9689d0
Author: Eric Avdey <[email protected]>
Date:   2016-05-03T16:36:52Z

    Add tests for couch_compress module

commit 925c1deb738617cd48bab40707b9b60e32a4dcdd
Author: Eric Avdey <[email protected]>
Date:   2016-05-03T17:58:51Z

    Raise an exception on corrupt binary decompression

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to