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

Make reload works in Rails error pages #40

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

budu
Copy link
Contributor

@budu budu commented Dec 3, 2024

For normal requests, headers are using the Rack::Headers where keys are case-insensitive.

In ActionDispatch::ShowExceptions, Rails uses a Hash instead which is case-sensitive. It uses the Rack::CONTENT_TYPE constant that is a down-case version of the header key.

In this commit, I changed the "Content-Type" key to "content-type" so that live reloading still works in the Rails error page.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
For normal requests, headers are using the `Rack::Headers` where keys are case-insensitive.

In `ActionDispatch::ShowExceptions`, Rails uses a Hash instead which is case-sensitive. It uses the `Rack::CONTENT_TYPE` constant that is a down-case version of the header key.

In this commit, I changed the "Content-Type" key to "content-type" so that live reloading still works in the Rails error page.
@budu budu changed the title Fix headers check for HTML content-type Make reload works in Rails error pages Dec 6, 2024
@igorkasyanchuk igorkasyanchuk merged commit 49abe77 into railsjazz:main Dec 18, 2024
@igorkasyanchuk
Copy link
Contributor

new version released, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants