mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
Fix handling of multiple Link headers (that should not be a thing though)
This commit is contained in:
parent
2603c7e69f
commit
e4aebad35a
1 changed files with 1 additions and 1 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue