Skip to content

Commit 12195e9

Browse files
committed
Wrap cookie value in array when storing it
This was also missed in the 2.2-stable backport.
1 parent 6e3bcfb commit 12195e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rack/mock.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def parse_cookies_from_header
282282
def identify_cookie_attributes(cookie_filling)
283283
cookie_bits = cookie_filling.split(';')
284284
cookie_attributes = Hash.new
285-
cookie_attributes.store('value', cookie_bits[0].strip)
285+
cookie_attributes.store('value', Array(cookie_bits[0].strip))
286286
cookie_bits.each do |bit|
287287
if bit.include? '='
288288
cookie_attribute, attribute_value = bit.split('=')

0 commit comments

Comments
 (0)