Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Set-Cookie issues #4

kris opened this Issue · 1 comment

3 participants


I can only assume this has to do with redis-store because it only pops up with redis-store. When I run cucumber, I get errors from webrat about `visit page_path(page_name)', and when running cucumber with -b, I get an error that points to:

/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/integration.rb:327:in `process'

Which is:

(@headers['Set-Cookie'] || "").split("\n").each do |cookie|
name, value = cookie.match(/^([^=])=([^;]);/)[1,2]
@cookies[name] = value

More precisely:

name, value = cookie.match(/^([^=])=([^;]);/)[1,2]

The issue is that @headers['Set-Cookie'] is returning:

" \nfoo=bar;"

So, `(@headers['Set-Cookie'] || "").split("\n").each do |cookie|' is passing an empty string to cookie, and then grabbing a MatchData#[] on an empty set raises an error.

Sessons break. Is this an issue with redis-store? I don't have this issue anywhere else.



I don't think this is a redis-store issue. This came up for me with Rails 2.3.8 and Rack 1.1.0. There's a ticket open here:

I used a piece of custom middleware to fix it:

@jodosha jodosha closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.