Skip to content
Snippets Groups Projects
Commit cff0b03c authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Fix for thread resolve service and process feed service url method

parent 2f21f4cc
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment