diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-27 23:49:12 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-27 23:49:12 +0200 |
commit | e4aebad35afae12f4b7503fb6c3783fcd3809761 (patch) | |
tree | 6a940e6694436ce1ae182c2180f0c208958354a0 /app | |
parent | 2603c7e69f54514861e18dbca0180010c955d8ff (diff) |
Fix handling of multiple Link headers (that should not be a thing though)
Diffstat (limited to 'app')
-rw-r--r-- | app/services/fetch_atom_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb index ada36b9f8..819bea02e 100644 --- a/app/services/fetch_atom_service.rb +++ b/app/services/fetch_atom_service.rb @@ -29,7 +29,7 @@ class FetchAtomService < BaseService def process_headers(url, response) Rails.logger.debug "Processing link header" - link_header = LinkHeader.parse(response['Link']) + link_header = LinkHeader.parse(response['Link'].is_a?(Array) ? response['Link'].first : response['Link']) alternate_link = link_header.find_link(['rel', 'alternate'], ['type', 'application/atom+xml']) return process_html(fetch(url)) if alternate_link.nil? |