dalli 5.2.6 → 5.2.7
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 +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/dalli/socket.rb +12 -2
- data/lib/dalli/version.rb +1 -1
- data/lib/rack/session/dalli.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f2cea6074db3fcade9ffdc5277b26cddb9752ee9a4229536e2a883755d4137e
|
|
4
|
+
data.tar.gz: 0f4294f047e670e18a2c97c0c7187e84449096a5e230faf7956547e634c996e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af2703898196c9ea24497f5777061d90b6797acb39faec3fc82b6206d2beb02668420d318bb519728b1f72383e66c05af465592ab0726e3703f5944b93a78c32
|
|
7
|
+
data.tar.gz: a59742b1c0c146cd2b36f0d36d55fc94c4491353d364a1c8a3f216452ba293b801d79fb7c34dc3ffa85bbe3aea0d72f82621f67dad3aada23579a5e50048e312
|
data/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
Dalli Changelog
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
5.2.7
|
|
5
5
|
==========
|
|
6
6
|
|
|
7
|
+
Bug fixes:
|
|
8
|
+
|
|
9
|
+
- `Rack::Session::Dalli`'s 401 for a session deleted mid-request called `Hash#slice` on the session options. A Rails session store puts an `ActionDispatch::Request::Session::Options` there, so the 401 raised `NoMethodError` instead of expiring the cookie (#1291, @seballot)
|
|
10
|
+
- Since 5.2.0, on JRuby with TLS, Dalli could wait `socket_timeout` for part of a reply that had already arrived, because jruby-openssl can hold it where neither `IO.select` nor OpenSSL's `pending` reports it. A `get_multi` could take `socket_timeout` longer than it needed to. Dalli now reads on JRuby until the TLS socket would block (#1293)
|
|
11
|
+
|
|
7
12
|
5.2.6
|
|
8
13
|
==========
|
|
9
14
|
|
data/lib/dalli/socket.rb
CHANGED
|
@@ -110,8 +110,18 @@ module Dalli
|
|
|
110
110
|
# OpenSSL can hold decrypted bytes that IO.select won't report as readable.
|
|
111
111
|
# With OpenSSL's default (no read-ahead) a short read has already used up
|
|
112
112
|
# the current record, so this is normally 0; it guards read-ahead setups.
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
#
|
|
114
|
+
# jruby-openssl can take the next record off the socket during a short
|
|
115
|
+
# read and hold it where neither pending nor IO.select sees it, so on
|
|
116
|
+
# JRuby a read continues until the socket would block.
|
|
117
|
+
if RUBY_ENGINE == 'jruby'
|
|
118
|
+
def buffered_data?
|
|
119
|
+
true
|
|
120
|
+
end
|
|
121
|
+
else
|
|
122
|
+
def buffered_data?
|
|
123
|
+
pending.positive?
|
|
124
|
+
end
|
|
115
125
|
end
|
|
116
126
|
|
|
117
127
|
unless method_defined?(:wait_readable)
|
data/lib/dalli/version.rb
CHANGED
data/lib/rack/session/dalli.rb
CHANGED
|
@@ -184,9 +184,12 @@ module Rack
|
|
|
184
184
|
end
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
+
# Rails stores an ActionDispatch::Request::Session::Options in the env, not a
|
|
188
|
+
# Hash. It implements [] (and to_hash) but not Hash#slice, so slicing it
|
|
189
|
+
# raised NoMethodError instead of returning this 401.
|
|
187
190
|
def missing_session_response(env)
|
|
188
191
|
options = env[Rack::RACK_SESSION_OPTIONS] || @default_options
|
|
189
|
-
cookie = Rack::Utils.delete_set_cookie_header(key, options
|
|
192
|
+
cookie = Rack::Utils.delete_set_cookie_header(key, { path: options[:path], domain: options[:domain] })
|
|
190
193
|
[401, { 'content-type' => 'text/plain', 'set-cookie' => cookie }, ['Wrong session ID']]
|
|
191
194
|
end
|
|
192
195
|
|