Permalink
Browse files

Fix cookie parsing

darcs-hash:20080224184600-4fc50-a0c322c967df89d53bc73aa5c581df08a6f99339.gz
  • Loading branch information...
1 parent 0639994 commit acb8695557bb80d35822b47b4f340ce4ef22f300 @chneukirchen chneukirchen committed Feb 24, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/request.rb
View
@@ -108,7 +108,7 @@ def cookies
# attributes (e.g., Domain) is unspecified.
@env["rack.request.cookie_hash"] =
Utils.parse_query(@env["rack.request.cookie_string"], ';,').inject({}) {|h,(k,v)|
- h[k] = v.respond_to?(:first) ? v.first : v
+ h[k] = Array === v ? v.first : v
h
}
end

0 comments on commit acb8695

Please sign in to comment.