Browse files

Make Rack::Recursive thread safe by removing shared state

  • Loading branch information...
1 parent 16dc2d1 commit dbff8799498100531e572daf69c5c1ccf4d59c02 @raggi raggi committed Mar 23, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/rack/recursive.rb
View
4 lib/rack/recursive.rb
@@ -35,6 +35,10 @@ def initialize(app)
end
def call(env)
+ dup._call(env)
+ end
+
+ def _call(env)
@script_name = env["SCRIPT_NAME"]
@app.call(env.merge('rack.recursive.include' => method(:include)))
rescue ForwardRequest => req

0 comments on commit dbff879

Please sign in to comment.