diff --git a/actionpack/lib/action_dispatch/middleware/debug_locks.rb b/actionpack/lib/action_dispatch/middleware/debug_locks.rb index 323bc9bd71..831e5e248c 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_locks.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_locks.rb @@ -99,8 +99,8 @@ def render_details(req) msg << "\n#{info[:backtrace].join("\n")}\n" if info[:backtrace] end.join("\n\n---\n\n\n") - [200, { "Content-Type" => "text/plain; charset=#{ActionDispatch::Response.default_charset}", - "Content-Length" => str.size }, [str]] + [200, { Rack::CONTENT_TYPE => "text/plain; charset=#{ActionDispatch::Response.default_charset}", + Rack::CONTENT_LENGTH => str.size.to_s }, [str]] end def blocked_by?(victim, blocker, all_threads) diff --git a/actionpack/test/dispatch/debug_locks_test.rb b/actionpack/test/dispatch/debug_locks_test.rb index d69614bd79..565e83071b 100644 --- a/actionpack/test/dispatch/debug_locks_test.rb +++ b/actionpack/test/dispatch/debug_locks_test.rb @@ -32,7 +32,9 @@ def test_render_threads_status private def build_app @app = self.class.build_app do |middleware| + middleware.use Rack::Lint middleware.use ActionDispatch::DebugLocks + middleware.use Rack::Lint end end end