about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-08 19:09:22 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-08 19:09:22 +0100
commitcff0b03cbb032e271a896ce6932af9353ea32507 (patch)
tree129644a98a91a10e6fa3ba9381ed330ceabe9eb0 /app
parent2f21f4cc018806de70d58327daf1bf5529dfc5bd (diff)
Fix for thread resolve service and process feed service url method
Diffstat (limited to 'app')
-rw-r--r--app/services/fetch_atom_service.rb5
-rw-r--r--app/services/process_feed_service.rb3
2 files changed, 6 insertions, 2 deletions
diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb
index f2625dcaa..5f00bf801 100644
--- a/app/services/fetch_atom_service.rb
+++ b/app/services/fetch_atom_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'
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index 19a58ee29..1fac60fe5 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -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)