steveklabnik / request_store

Per-request global storage for Rack.
https://github.com/steveklabnik/request_store
MIT License
1.47k stars 87 forks source link

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

Closed ghiculescu closed 2 years ago

ghiculescu commented 3 years ago

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.