[rspec-users] Story runner has session limit of 4000 bytes, like CookieStore

Yar Dmitriev yar.dmitriev at gmail.com
Wed Oct 1 17:59:11 EDT 2008


This could be intentional, but still surprising.

Say, we are using ActiveRecord session store, according to the setting
in environment.rb:
config.action_controller.session_store = :active_record_store

When controller writes 5000 bytes to the session:
session[:foo] = "a" * 5000

The application works correctly (because there is no 4K limit for the
ActiveRecord store), but story runner raises the error:
CGI::Session::CookieStore::CookieOverflow

I spent an hour trying to understand how it worked there, without
success. Ended up writing custom, more efficient marshalling code for
one of my classes. Being able to fit sessions into CookieStore is
useful by itself, of course.


More information about the rspec-users mailing list