Permalink
Browse files

better error message when unable to parse cookie, see #225

  • Loading branch information...
1 parent 84a9d3e commit 2c460e3eeaa7124940f79cc19a5e16419b2980e9 @rkh rkh committed Aug 23, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/rack/request.rb
View
@@ -244,6 +244,8 @@ def cookies
Utils.parse_query(string, ';,').each { |k,v| hash[k] = Array(v).first }
@env["rack.request.cookie_string"] = string
hash
+ rescue => error
+ raise error.class, "cannot parse Cookie header: #{error.message}"
end
def xhr?

0 comments on commit 2c460e3

Please sign in to comment.