Просмотр исходного кода

Skip processing when HEAD method returns 501 (#7730)

master
Yamagishi Kazutoshi 6 лет назад
committed by Eugen Rochko
Родитель
Сommit
e3fb528d12
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      app/services/fetch_link_card_service.rb

+ 1
- 1
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


Загрузка…
Отмена
Сохранить