dalli 3.2.10 → 3.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9cebd01e657a541e7685974157dc2ab4a6e497a721ee7d4f74a35c377eca642
4
- data.tar.gz: 8ee63be1f4883d090f76ce4ab9d906ee44b7175b2d3a94940a1833feb221d7f3
3
+ metadata.gz: 17d814f4043cf5882166c1519dd436fb4a7d0caef32c86789dd5da3c5e51e52c
4
+ data.tar.gz: 27ba5ff384558a7ab08c7dcb3e6f2cf43af4c04dddc1ce2e5ca4ab1d35b01001
5
5
  SHA512:
6
- metadata.gz: 5dc86292a8a53254969b27a055fbb211e9f3d883788f9e52a546dcba415a764919b6d770afb17597ffda6e5f1411e25c6297201dfdb8ea078c3bf13737e81208
7
- data.tar.gz: 1dc924140f6b5ca737467079a100971589d79ba912e91f0e460d67507366a08c03e73806710c92251f9e3cc20bda574df0b0e268a3e7c7413150fb3d38dbd23c
6
+ metadata.gz: 63914cbb89b5a5d517dfd11f72b6bd56b22c9cb0700d9d53a037e12c7d9872150038f5a50b20f959bda47160644a30a433720e99da54ad048b15fee03ddb9baf
7
+ data.tar.gz: 11ede1a2e918d269cd084f171c97e5bad156b96fe0384e366cd531cc68a543bd1061b34ac437a7c2794e27ad6f63a3661e035c01bb4e8172d6753cfbca839fd1
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ Dalli Changelog
4
4
  Unreleased
5
5
  ==========
6
6
 
7
+ 3.2.11
8
+ ==========
9
+
10
+ - Fix multi-server `get_multi` stopping at an empty value (#1170)
11
+ - The pipelined reply parser took a hit on a zero-length value (`VA 0`) for the terminating `MN`, so that server's remaining keys were silently missing from the result
12
+ - Its value terminator and any replies not yet parsed stayed on the connection and were read as the replies to later commands on it. Those commands could fail with `Dalli::DalliError: Response error`, or a single-key `get` could silently return another key's value
13
+ - An empty value is now returned as `''`, like a single-key `get` and single-server `get_multi`
14
+ - Affects only clients using `protocol: :meta`; the default binary protocol is not affected
15
+ - Thanks to Julian Richard Contreras for this contribution
16
+
7
17
  3.2.10
8
18
  ==========
9
19
 
@@ -143,8 +143,10 @@ module Dalli
143
143
  # We have a complete response that has no body.
144
144
  # This is either the response to the terminating
145
145
  # noop or, if the status is not MN, an intermediate
146
- # error response that needs to be discarded.
147
- return [header_len, true, nil, nil, nil] if body_len.zero?
146
+ # error response that needs to be discarded. A hit
147
+ # on an empty value (VA 0) still has a body -- just
148
+ # its terminator -- so it's parsed below as a value.
149
+ return [header_len, true, nil, nil, nil] if no_body?(tokens, body_len)
148
150
 
149
151
  resp_size = header_len + body_len + TERMINATOR.length
150
152
  # The header is in the buffer, but the body is not. As we don't have
@@ -157,6 +159,11 @@ module Dalli
157
159
  full_response_from_buffer(tokens, body, resp_size)
158
160
  end
159
161
 
162
+ # A zero-size reply has no body unless it's a VA (a hit on an empty value)
163
+ def no_body?(tokens, body_len)
164
+ body_len.zero? && tokens.first != VA
165
+ end
166
+
160
167
  def contains_header?(buf)
161
168
  buf.include?(TERMINATOR)
162
169
  end
data/lib/dalli/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dalli
4
- VERSION = '3.2.10'
4
+ VERSION = '3.2.11'
5
5
 
6
6
  MIN_SUPPORTED_MEMCACHED_VERSION = '1.4'
7
7
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.10
4
+ version: 3.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter M. Goldstein
8
8
  - Mike Perham
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2026-09-25 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: logger
@@ -76,7 +75,6 @@ metadata:
76
75
  bug_tracker_uri: https://github.com/petergoldstein/dalli/issues
77
76
  changelog_uri: https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md
78
77
  rubygems_mfa_required: 'true'
79
- post_install_message:
80
78
  rdoc_options: []
81
79
  require_paths:
82
80
  - lib
@@ -91,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
89
  - !ruby/object:Gem::Version
92
90
  version: '0'
93
91
  requirements: []
94
- rubygems_version: 3.5.4
95
- signing_key:
92
+ rubygems_version: 4.0.21
96
93
  specification_version: 4
97
94
  summary: High performance memcached client for Ruby
98
95
  test_files: []