Skip to content
Snippets Groups Projects
Commit 45387b7f authored by David Douard's avatar David Douard
Browse files

api/server: fallback to application/json as best mimetype for content nego

we almost never return text/plain or text/html, so json is a better default
value.
parent 9afcaddf
No related branches found
Tags swh-loader-highpriority-20230203.1
1 merge request!46api/server: fallback to application/json as best mimetype for content nego
......@@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
class Negotiator(NegotiatorBase):
def best_mimetype(self):
return request.accept_mimetypes.best_match(
self.accept_mimetypes, 'text/html')
self.accept_mimetypes, 'application/json')
def _abort(self, status_code, err=None):
return abort(status_code, err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment