mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add have_http_link_header matcher and set header values as strings (#31010)
This commit is contained in:
@@ -20,7 +20,7 @@ module AccountControllerConcern
|
||||
webfinger_account_link,
|
||||
actor_url_link,
|
||||
]
|
||||
)
|
||||
).to_s
|
||||
end
|
||||
|
||||
def webfinger_account_link
|
||||
|
||||
@@ -19,7 +19,7 @@ module Api::Pagination
|
||||
links = []
|
||||
links << [next_path, [%w(rel next)]] if next_path
|
||||
links << [prev_path, [%w(rel prev)]] if prev_path
|
||||
response.headers['Link'] = LinkHeader.new(links) unless links.empty?
|
||||
response.headers['Link'] = LinkHeader.new(links).to_s unless links.empty?
|
||||
end
|
||||
|
||||
def require_valid_pagination_options!
|
||||
|
||||
@@ -56,7 +56,9 @@ class StatusesController < ApplicationController
|
||||
end
|
||||
|
||||
def set_link_headers
|
||||
response.headers['Link'] = LinkHeader.new([[ActivityPub::TagManager.instance.uri_for(@status), [%w(rel alternate), %w(type application/activity+json)]]])
|
||||
response.headers['Link'] = LinkHeader.new(
|
||||
[[ActivityPub::TagManager.instance.uri_for(@status), [%w(rel alternate), %w(type application/activity+json)]]]
|
||||
).to_s
|
||||
end
|
||||
|
||||
def set_status
|
||||
|
||||
Reference in New Issue
Block a user