Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails/Rack inconsistency about `:expires_after`/`:expires` cookie option.

#6634

Rails seems to indicate that it accepts a :expires_after option for cookies in the session setup. However, it uses Rack's Rack::Utils.set_cookie_header! method... which expects an :expires option...

https://github.com/rails/rails/blob/v2.3.11/actionpack/lib/action_c...

https://github.com/rack/rack/blob/1.1/lib/rack/utils.rb#L176-205

Reported by Aaron Gibralter · March 27th, 2011 @ 08:48 PM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Aaron Gibralter
    Aaron Gibralter

    What's more -- Rack seems to expect the :expires option as a Time object. I keep getting can't clone Fixnum (TypeError) because I have :expires in my environment.rb set to a number of seconds in the future... Setting the config.action_controller.session = { :expires => '...' } to a Time object doesn't really make sense, does it?

    March 27th, 2011 @ 09:10 PM

  2. gmarik
  3. gmarik
    gmarik

    Also this monkeypatch works for me (until Rails is fixed)

    April 4th, 2011 @ 11:14 PM

  4. Aaron Gibralter
  5. gmarik