duplicate the middleware to potentially solve threading conflicts

This commit is contained in:
John Bintz 2012-03-04 13:25:45 -05:00
parent 2e9828645a
commit 075b92e7f4

View File

@ -42,6 +42,10 @@ module Rack
end end
def call(env) def call(env)
dup._call(env)
end
def _call(env)
_, path, file = (env['PATH_INFO'] || '').split('/') _, path, file = (env['PATH_INFO'] || '').split('/')
if path == '__rack' && ::File.file?(target = ::File.expand_path("../../../js/#{file}", __FILE__)) if path == '__rack' && ::File.file?(target = ::File.expand_path("../../../js/#{file}", __FILE__))