I want to use non-persistent cookies in a Sinatra app, i.e. a cookie that is deleted by the browser at the end of the session. My understanding is that cookies that do not have an expires field are non-persistent.
I set cookies using response.set_cookie( name, :value=>X ).
By default Sinatra is setting the expires field in this cookie (for 2038 to be exact).
I have tried disabling this field with set_cookie( name, :value=>X, :expires => nil ) but this didn't work.
I also tried set( :cookie_options, :expires => nil ) and that didn't work either.
For reasons I won't get into here, I am not enabling sessions in Sinatra - I am creating cookies directly using response.set_cookie().