Permalink
Browse files

Return empty hash on lack of cookies

darcs-hash:20070219112219-4fc50-6a7d41c9531790f9645ab477852172492412b021.gz
  • Loading branch information...
1 parent dc6e7a0 commit b68c2d51466d9a4ca6c6e10912893ad9dcdee7cd @chneukirchen chneukirchen committed Feb 19, 2007
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/rack/request.rb
View
2 lib/rack/request.rb
@@ -50,6 +50,8 @@ def params
end
def cookies
+ return {} unless @env["HTTP_COOKIE"]
+
if @env["rack.request.cookie_string"] == @env["HTTP_COOKIE"]
@env["rack.request.cookie_hash"]
else

0 comments on commit b68c2d5

Please sign in to comment.