logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: e7d55df38d8c18819e79646bb7d1365c5eab54f3
parent: a72d03f43c1ffade898677851205ce20f422b8b0
Author: Yamagishi Kazutoshi <ykzts@desire.sh>
Date:   Sun, 10 Dec 2017 00:53:40 +0900

Ignore HEAD method if does not support (#5949)


Diffstat:

Mapp/services/fetch_link_card_service.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb @@ -38,7 +38,7 @@ class FetchLinkCardService < BaseService @card ||= PreviewCard.new(url: @url) res = Request.new(:head, @url).perform - return if res.code != 200 || res.mime_type != 'text/html' + return if res.code != 405 && (res.code != 200 || res.mime_type != 'text/html') attempt_oembed || attempt_opengraph end