Improve handling of HTTP_ACCEPT for webfinger (#2008)
This change includes: - Improve the spec coverage for incoming request to the webfinger action - For requests without an accept header (ie, what a browser might look like), return a JSON response. - For requests with an explicit format of xml or json, return that format. - For requests using an accept header, return that format. Also adds failing spec showing webfinger does not return xml, which covers the issue described in: https://github.com/tootsuite/mastodon/issues/1983
Showing
- app/controllers/well_known/webfinger_controller.rb 7 additions, 2 deletionsapp/controllers/well_known/webfinger_controller.rb
- config/routes.rb 1 addition, 1 deletionconfig/routes.rb
- spec/requests/webfinger_request_spec.rb 30 additions, 15 deletionsspec/requests/webfinger_request_spec.rb
- spec/routing/well_known_routes_spec.rb 1 addition, 1 deletionspec/routing/well_known_routes_spec.rb
Loading
Please register or sign in to comment