Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommonLogger cannot handle non-Array responses. #43

Closed
postmodern opened this issue Aug 12, 2010 · 7 comments
Closed

CommonLogger cannot handle non-Array responses. #43

postmodern opened this issue Aug 12, 2010 · 7 comments

Comments

@postmodern
Copy link
Contributor

I noticed that in CommonLogger, it performs an implicit Array splat when receiving responses from the parent application:

      status, header, body = @app.call(env)

This will not properly set headers or body if the parent application returns Rack::Response or a Struct.new(:status, :headers, :body).

@postmodern
Copy link
Contributor Author

This can be fixed by aliasing to_ary to finish.

@postmodern
Copy link
Contributor Author

This is due to a change in Ruby 1.9.2. http://redmine.ruby-lang.org/issues/show/1393

@postmodern
Copy link
Contributor Author

@raggi
Copy link
Member

raggi commented Aug 25, 2010

i've seen this and agree, i'll get to it when i have some time, there's no need to be rude in the channel. thank you for your patch, it is appreciated.

@postmodern
Copy link
Contributor Author

Thanks for tracking this. I guess in the mean time I can extend Rack::Response and add the alias there.

@raggi
Copy link
Member

raggi commented Aug 25, 2010

Yeah, I'm sorry we don't have more time right now, and the last two releases have needed a bit of work :-/

@raggi
Copy link
Member

raggi commented Sep 3, 2010

pushing shortly.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants