Rack 1.1.3 expects the Set-Cookie header to be a newline-delimited string, so we'd want to invert this check. Rather than splitting strings, just join arrays:

```ruby
def convert_cookies!
  headers['Set-Cookie'] = headers['Set-Cookie'].compact.join("\n") if headers['Set-Cookie'].is_a?(Array)
end
```