Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rack::Lint to DebugLocks tests #48832

Merged
merged 1 commit into from Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions actionpack/lib/action_dispatch/middleware/debug_locks.rb
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions actionpack/test/dispatch/debug_locks_test.rb
Expand Up @@ -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