You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running this code under 1.2.3 and requesting "/foo" results in 100% CPU usage and massive log output as the application keeps calling the same route again and again:
tmp.rb:3:in `block in <main>'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1165:in `call'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:1165:in `block in compile!'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:738:in `instance_eval'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:738:in `route_eval'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:722:in `block (2 levels) in route!'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:772:in `block in process_route'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:769:in `catch'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:769:in `process_route'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:721:in `block in route!'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:720:in `each'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:720:in `route!'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:857:in `dispatch!'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `block in call!'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `instance_eval'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `block in invoke'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `catch'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:822:in `invoke'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.2.3/lib/sinatra/base.rb:648:in `call!'
It looks like that PATH_INFO is pulled not from the environment directly but from the duplicated environment's Sinatra::Request object. For a working hack to accomplish this same goal, see this Stack Overflow answer.
I'm not sure if
the issue here is that a legitimate change has been made and the documentation needs to be updated, or
if what the documentation suggests should still work and there is a recently-introduced bug in the route handling of Sinatra.
The text was updated successfully, but these errors were encountered:
Running this code under 1.2.3 and requesting "/foo" results in 100% CPU usage and massive log output as the application keeps calling the same route again and again:
It looks like that PATH_INFO is pulled not from the environment directly but from the duplicated environment's Sinatra::Request object. For a working hack to accomplish this same goal, see this Stack Overflow answer.
I'm not sure if
The text was updated successfully, but these errors were encountered: