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

Fix fatal crash when a mutable const is returned by the app #78

Merged

Conversation

ghiculescu
Copy link
Contributor

@ghiculescu ghiculescu commented Aug 11, 2021

If an app using RequestStore returns a mutable constant, it gets mutated by RequestStore. This can cause errors as the object can keep growing larger and eventually crash. The fix is to not mutate the response body but instead return a new Rack::BodyProxy object.

@ghiculescu ghiculescu changed the title Fix fatal crash when a const is returned Fix fatal crash when a mutable const is returned by the app Aug 11, 2021
@steveklabnik steveklabnik merged commit 6dab664 into steveklabnik:master Jan 18, 2022
@ghiculescu ghiculescu deleted the stack-overflow-const-response branch January 18, 2022 17:27
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.

2 participants