1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Remove extra calls to method that determines cookie paths

This commit is contained in:
Jordan Owens 2016-07-31 16:24:58 -04:00
parent cd5028b5c9
commit 00027380ce

View file

@ -39,8 +39,10 @@ module Rack
end
def remove_bad_cookies(request, response)
return if bad_cookies.empty?
paths = cookie_paths(request.path)
bad_cookies.each do |name|
cookie_paths(request.path).each { |path| response.set_cookie name, empty_cookie(request.host, path) }
paths.each { |path| response.set_cookie name, empty_cookie(request.host, path) }
end
end