# File lib/request_store/middleware.rb, line 16
    def call(env)
      RequestStore.begin!

      response = @app.call(env)

      returned = response << Rack::BodyProxy.new(response.pop) do
        RequestStore.end!
        RequestStore.clear!
      end
    ensure
      unless returned
        RequestStore.end!
        RequestStore.clear!
      end
    end