-
Notifications
You must be signed in to change notification settings - Fork 116
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
ERROR Rack::Lint::LintError #1
Comments
I am facing the same problem .. Any luck with that ? |
This is actually the same bug as issues #2 and #6. The Rack standard dictates that a response body should respond to #each; It's because Limiter#rate_limit_exceeded is returning its response as a String, which responded to #each in ruby 1.8 but does not in 1.9. The correct fix is to wrap the response body in an array, as in 02297be. You should try using one of the forks, most of them incorporate this fix or have made it independently. Mainline appears pretty strongly to be unmaintained. I'll obviously plug for mine (https://github.com/bensomers/improved-rack-throttle), but there are several that would work. (Incidentally, my commit referencing this issue is an example of github's Markdown being overly aggressive. I actually just wanted a numbered list in that commit message, not specific issue references.) |
Thanks so much @bensomers I tried the improved-rack-throttle and it did the job .. I really hope the authors respond to the pull requests to have a single reference. The last commit had been 2 years ago |
Cleaning up old Issues, this should be fixed as of #17 |
Hi, was trying to use rack-throttle on Interval 3sec, and it works just fine until you hit the threshold, in which it errors out with:
[2011-02-04 21:00:37] ERROR Rack::Lint::LintError: Response body must respond to each
/Users/kris/.rvm/gems/ruby-1.9.2-p136@rails3/gems/rack-1.2.1/lib/rack/lint.rb:19:in
assert' /Users/kris/.rvm/gems/ruby-1.9.2-p136@rails3/gems/rack-1.2.1/lib/rack/lint.rb:513:in
each'/Users/kris/.rvm/gems/ruby-1.9.2-p136@rails3/gems/rack-1.2.1/lib/rack/handler/webrick.rb:64:in
service' /Users/kris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/httpserver.rb:111:in
service'/Users/kris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/httpserver.rb:70:in
run' /Users/kris/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/server.rb:183:in
block in start_thread'The text was updated successfully, but these errors were encountered: