diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-12-10 00:53:40 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-12-09 16:53:40 +0100 |
commit | e7d55df38d8c18819e79646bb7d1365c5eab54f3 (patch) | |
tree | 9d5b65d783ffa92b9197ddec6f5f6a05c1004d78 /app | |
parent | a72d03f43c1ffade898677851205ce20f422b8b0 (diff) |
Ignore HEAD method if does not support (#5949)
Diffstat (limited to 'app')
-rw-r--r-- | app/services/fetch_link_card_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index cec96d927..7f4518ea7 100644 --- 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 |