logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: e4aebad35afae12f4b7503fb6c3783fcd3809761
parent: 2603c7e69f54514861e18dbca0180010c955d8ff
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Tue, 27 Sep 2016 23:49:12 +0200

Fix handling of multiple Link headers (that should not be a thing though)

Diffstat:

Mapp/services/fetch_atom_service.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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?