Getting a strange cookie error

Travis Bell travis at meticulo.com
Fri Jan 22 18:29:56 EST 2010


Hi Eric,

Thanks for looking into this. I'll strip down my app and do a similar "Hello World" version and see how I make out. I will give that method of loading Thin a try too.

Report back when I know more.


Thanks!

-- 
Travis Bell




On 2010-01-22, at 1:06 PM, Travis Bell wrote:

> Just a follow up, it looks like it was rack 1.1.0 causing the issues. I uninstalled it, and am now using rack 1.0.1 and the error has gone away.
> 
> Why it worked with Thin + Rack 1.1.0 and not Unicorn, still not sure.
> 
> 
> Cheers guys.
> 
> -- 
> Travis Bell
> http://www.twitter.com/travisbell
> http://www.twitter.com/themoviedb
> 
> 
> 
> On 2010-01-21, at 11:30 PM, Travis Bell wrote:
> 
>> Hey guys,
>> 
>> I've been developing with Thin since day 1 (many months) and today, as I started moving everything to test on production (with Unicorn) started getting this weird error.
>> 
>> I am using Sinatra, and have been setting my cookies like so:
>> 
>>        response.set_cookie('foo', {
>>           :value => "bar",
>>           :path => '/',
>>           :expires => Time.today+14400
>>        })
>> 
>> In Thin, Webrick, Passenger, this seems to work fine. However in Unicorn I get a big fat ugly error:
>> 
>> # Rack::Lint::LintError at /login
>> # a header value must be a String, but the value of 'Set-Cookie' is a Array
>> # /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb: in assert, line 18
>> 
>> I'm not really sure what this means since :value is a string. I am using the following versions:
>> 
>> - REE (1.8.7-2010.01)
>> - Rack 1.1.0
>> - Unicorn 0.96.0
>> - Latest Sinatra from source
>> 
>> Does anyone have any input as to why this is happening? I have been able to re-produce this on a 32-bit CentOS box and my local MacBook Pro (Snow Leopard).
>> 
>> 
>> Cheers,
>> 
>> -- 
>> Travis Bell
>> http://www.twitter.com/travisbell
>> http://www.twitter.com/themoviedb
>> 
>> 
>> 
> 



More information about the mongrel-unicorn mailing list