Skip to content

Commit

Permalink
Use undeprecated method to set cookie.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 3, 2022
1 parent e86e4a6 commit d7b679f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rack/session/abstract/id.rb
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,9 @@ def cookie_value(data)
# Sets the cookie back to the client with session id. We skip the cookie
# setting if the value didn't change (sid is the same) or expires was given.

def set_cookie(request, res, cookie)
def set_cookie(request, response, cookie)
if request.cookies[@key] != cookie[:value] || cookie[:expires]
res.set_cookie_header =
Utils.add_cookie_to_header(res.set_cookie_header, @key, cookie)
response.set_cookie(@key, cookie)
end
end

Expand Down

0 comments on commit d7b679f

Please sign in to comment.