You can clone with
When working on multiple rails projects I kept getting the following error:
cannot parse Cookie header: undefined method `size' for nil:NilClass
I could temporarily fix by deleting my browser cookies. However, not until I pointed to master branch of Rack was I able to make the problem go away for good.
I posted this solution on StackOverflow, and it seems it's fixing it for others as well.http://stackoverflow.com/questions/9054604/rails-3-2-1-cannot-parse-cookie-header-undefined-method-size-for-nilnilcla
We hit same issue when upgrading to rails 3.2.3. The issue is caused by empty params in the cookie query string. It's already fixed in the master by this commit: cb05a10
We could not use master branch as it caused other error in our test suite. So ended up forking, branching of 1.4.1 and cherry-picking the commit above.
Actually, an earlier commit contains the actual fix, I believe:
On our large site, we've seen many of these errors caused by malformed Google Analytics cookies. I'm surprised there hasn't been more of a groundswell to get a new rack release out because of this problem.
Yep, I'm seeing this too, since upgrading from Rails 3.2.3 to 3.2.5, with the Rack version unchanged at 1.4.1.
For the impatient, here's a monkey-patch file: https://gist.github.com/2877275
I'm noticing it too. Here's a quick way to reproduce ...
lib/rack/request.rb:263 sets the separator to ";,"
If the cookie value has commas in it
Rack::Utils.parse_query("utmcct=/some/value/0,,,00.html; ", ';,')
NoMethodError: undefined method `size' for nil:NilClass
Two approaches you can take are to either drop the pair as in @purcell approach above or try to clean it.
This issue is already fixed by #378.