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
1 changed files with 4 additions and 0 deletions

View File

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