cvonkleist / encrypted_cookie

AES-128 encrypted session cookies for Rack (and Sinatra and other frameworks).
MIT License
53 stars 14 forks source link

Support Rack 2.2.0+ #16

Closed stevenharman closed 4 years ago

stevenharman commented 4 years ago

A change in Rack 2.2.0 means it's no longer safe to directly require a subset of Rack (e.g., require "rack/response") because that won't trigger proper autoloading. For example, we're directly requiring "rack/response", which internally expects ::Rack::Utils to be loaded, or to autoload. But because we've not done require "rack", which sets up the autoloading, we get an uninitialized constant error (uninitialized constant Rack::Response::Utils). The fix is to require all of Rack.

See: rack/rack@ab41dcc#diff-10b933d2c1fdc82ceecade456c64e1c2

namelessjon commented 4 years ago

Hi there

Sorry for the long delay in getting back to you this, and thank you so much for putting in the time to write this