diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2018-06-04 20:42:53 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-06-04 13:42:53 +0200 |
commit | e3fb528d123d7d56f3bb669634a18de358c87073 (patch) | |
tree | d1018073ecfd9e52b90dc5dc27f719fba054e3c1 /app | |
parent | e0354aba7ca05c4d8bf4e19fab0cbb0ecde2950f (diff) |
Skip processing when HEAD method returns 501 (#7730)
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 86d0f9971..560a81768 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -40,7 +40,7 @@ class FetchLinkCardService < BaseService @card ||= PreviewCard.new(url: @url) failed = Request.new(:head, @url).perform do |res| - res.code != 405 && (res.code != 200 || res.mime_type != 'text/html') + res.code != 405 && res.code != 501 && (res.code != 200 || res.mime_type != 'text/html') end return if failed |