Skip to content

Commit

Permalink
better error message when unable to parse cookie, see #225
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Sep 7, 2011
1 parent 92dd18d commit df77a0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rack/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit df77a0f

Please sign in to comment.