Fix for thread resolve service and process feed service url method

master
Eugen Rochko 8 years ago
parent 2f21f4cc01
commit cff0b03cbb
  1. 5
      app/services/fetch_atom_service.rb
  2. 3
      app/services/process_feed_service.rb

@ -3,6 +3,11 @@ class FetchAtomService < BaseService
response = http_client.head(url)
Rails.logger.debug "Remote status HEAD request returned code #{response.code}"
response = http_client.get(url) if response.code == 405
Rails.logger.debug "Remote status GET request returned code #{response.code}"
return nil if response.code != 200
if response.mime_type == 'application/atom+xml'

@ -175,8 +175,7 @@ class ProcessFeedService < BaseService
def url(xml = @xml)
link = xml.at_xpath('./xmlns:link[@rel="alternate"]')
link['href'] unless link.nil?
nil
link.nil? ? nil : link['href']
end
def content(xml = @xml)

Loading…
Cancel
Save