Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

[Compression] Riak inconsistent compression behaviour with 404 Not Found responses #43

Closed
ajantis opened this issue Jan 30, 2017 · 1 comment
Labels

Comments

@ajantis
Copy link
Collaborator

ajantis commented Jan 30, 2017

Problem

The optional gzip compression for requests and responses is introduced with #40 PR.

When trying to delete an already deleted object, Riak returns a 404 response with a text/plain body - "not found". However, this response MIGHT have a "Content-Encoding: gzip" header (and non-compressed body still). Trying to decompress the payload of such response leads to an internal java.util.zip.ZipException: Not in GZIP format exception in the riak client's http pipeline.

How to reproduce

It has proved to be almost impossible to easily reproduce that behaviour with curl.
But a test scenario in RiakGzipSpec.scala submitted together with the #40 pull request triggers this behaviour in ~75% runs on my machine.

Workaround

As a workaround, we may want to not fail response decompression directive in case of a ZipException, but just proceed with payload as it is. ( yes, it does sound ugly :) )

@ajantis ajantis added the bug label Jan 30, 2017
@ajantis
Copy link
Collaborator Author

ajantis commented Feb 21, 2017

There is a fix_^W_workaround for that behaviour in #40 PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant