if type == 'X-Sendfile' path = F.expand_path(body.to_path) headers[CONTENT_LENGTH] = '0' headers[type] = path obody = body body = Rack::BodyProxy.new([]) do obody.close if obody.respond_to?(:close) end end end [status, headers, body] end 当前 middleware Rack::Sendfile 下⼀一个 middleware ……
headers[ETAG_STRING] = %(W/"#{digest}") if digest end unless headers[CACHE_CONTROL] headers[CACHE_CONTROL] = @cache_control if @cache_control end [status, headers, body] end 当前 middleware Rack::ETag 下⼀一个 middleware ActionDispatch::Routing::RouteSet