Skip to content

Commit 3a2e9a1

Browse files
committed
send uncompress value and proper set compressed flags when compression saving is too small
1 parent 0753bec commit 3a2e9a1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

php_memcached.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ zend_bool s_compress_value (php_memc_compression_type compression_type, zend_str
868868

869869
/* This means the value was too small to be compressed, still a success */
870870
if (ZSTR_LEN(payload) < (compressed_size * MEMC_G(compression_factor))) {
871+
MEMC_VAL_DEL_FLAG(*flags, MEMC_VAL_COMPRESSION_FASTLZ | MEMC_VAL_COMPRESSION_ZLIB);
871872
efree (buffer);
872873
return 1;
873874
}

0 commit comments

Comments
 (0)