Merge pull request #4039 from tgxworld/follow_redirects_when_downloading_favicon

FIX: Follow redirects when downloading favicons.
This commit is contained in:
Sam 2016-02-27 16:40:00 +11:00
commit e8d4935a2c

View file

@ -101,7 +101,7 @@ class StaticController < ApplicationController
data = DistributedMemoizer.memoize('favicon' + SiteSetting.favicon_url, 60*30) do
begin
file = FileHelper.download(SiteSetting.favicon_url, 50.kilobytes, "favicon.png")
file = FileHelper.download(SiteSetting.favicon_url, 50.kilobytes, "favicon.png", true)
data = file.read
file.unlink
data