From: Frank Bryden Date: Mon, 10 Aug 2020 11:44:11 +0000 (+0000) Subject: Fix for 1111 Reordering of format_out X-Git-Tag: release-v9.0-start~27 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F9556%2F1;p=osm%2FNBI.git Fix for 1111 Reordering of format_out Change-Id: I59f64d22c39c82bf099c74647d0f128092d24f95 Signed-off-by: Frank Bryden --- diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 2b54ae5..ecd6a5a 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -619,7 +619,7 @@ class Server(object): if accept: if "text/html" in accept: return html.format(data, cherrypy.request, cherrypy.response, token_info) - elif "application/yaml" in accept or "*/*" in accept or "text/plain" in accept: + elif "application/yaml" in accept or "*/*" in accept: pass elif "application/json" in accept or (cherrypy.response.status and cherrypy.response.status >= 300): cherrypy.response.headers["Content-Type"] = 'application/json; charset=utf-8'