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.

Empty Set-Cookie header

#3811

The current (as of 2.3.5) ActionController::Response#convert_cookies! method generates an empty Set-Cookie header if there aren't any cookies. This gets caught by (at least) thin and webrick. Both remove the empty Set-Cookie header line. However unicorn doesn't and I think it's Rails responsibility to not generate a header like this. Changing the convert_cookies! method to something like this fixes the problem:

def convert_cookies!
  cs = Array(headers['Set-Cookie']).compact
  headers['Set-Cookie'] = cs unless cs.empty?
end

Reported by Urban Hafner · January 29th, 2010 @ 02:26 PM

State: resolved
Milestone: 2.3.6
Assigned to: josh josh
Importance: Low