evereq/couchbase-aspnet

compression always on

Closed this issue · 2 comments

Hiello

I checked my project and found no matter what I've set in web.confg, compression will always turned "on", seems it is because the code didn't set the compressor to null even the compress = false.

Is there any work around on this issue? Thanks!

//code
var compress = ProviderHelper.GetAndRemove(config, "compress", false) ?? "false";
_compressData = (String.Compare(compress, "true", StringComparison.OrdinalIgnoreCase) == 0);

var compressionTypeString = ProviderHelper.GetAndRemove(config, "compressionType", false) ?? "quicklz";
_compressor = CompressorFactory.Create(compressionTypeString);

Finally I found it is working by using compressionType="none" but not compress = "false"

compress="false" <-not working

compressionType="none" <- working

Hi! Thanks a lot for reporting of the issue! I made a fix (and also NuGet package updated)