about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-12-10 00:53:40 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-12-09 16:53:40 +0100
commite7d55df38d8c18819e79646bb7d1365c5eab54f3 (patch)
tree9d5b65d783ffa92b9197ddec6f5f6a05c1004d78 /app/services
parenta72d03f43c1ffade898677851205ce20f422b8b0 (diff)
Ignore HEAD method if does not support (#5949)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_link_card_service.rb2
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