use Rack::Sendfile use Rack::Lock use #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007fec4c51c210> use Rack::Runtime use Rack::MethodOverride use ActionDispatch::RequestId use Rails::Rack::Logger use ActionDispatch::ShowExceptions use ActionDispatch::DebugExceptions use ActionDispatch::RemoteIp use ActionDispatch::Callbacks use ActiveRecord::ConnectionAdapters::ConnectionManagement use ActiveRecord::QueryCache use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash use ActionDispatch::ParamsParser use Rack::Head use Rack::ConditionalGet use Rack::ETag run Blog::Application.routes
use Rack::Sendfile # 设置服务器上的 X-Sendfile 报头 use Rack::Lock # 用于多线程加锁,多线程模式下保证线程安全 use #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007fec4c51c210> # 在内存中保存缓存 use Rack::Runtime # 记录生成X-Runtime,用于客户端获取请求执行时间 use Rack::MethodOverride # 通过客户端传递的_method参数实现了对PUT 和 DELETE 请求的支持 use ActionDispatch::RequestId # 生成X-Request-Id头,返回给客户端,使客户端能够知道具体哪台机器的响应 use Rails::Rack::Logger # 记录请求日志 use ActionDispatch::ShowExceptions # 补救程序抛出的所有异常 use ActionDispatch::DebugExceptions # 如果在本地开发,把异常写入日志,并显示一个调试页面 use ActionDispatch::RemoteIp # 获取远程ip use ActionDispatch::Callbacks # 提供回调支持 use ActiveRecord::ConnectionAdapters::ConnectionManagement # 请求结束以后清理没有回收的数据库连接 use ActiveRecord::QueryCache # 启用ActiveRecord查询缓存 use ActionDispatch::Cookies # 是应用支持cookies use ActionDispatch::Session::CookieStore # 支持session的cookie store use ActionDispatch::Flash # 支持闪现功能 use ActionDispatch::ParamsParser # 把请求中的参数出入 params use Rack::Head # 把 HEAD 请求转换成 GET 请求,并处理 use Rack::ConditionalGet # 添加对“条件 GET”的支持,如果页面未修改,就不响应 use Rack::ETag # 为所有字符串类型的主体添加 ETags 报头。ETags 用来验证缓存