Looks like there is a new quatum_auth_token.py which uses incorrect behavior and is been found and fixed by Dolph.
This is how our code looks
def is_xml_response(req):
"""Returns True when the request wants an XML response, False otherwise"""
return "Accept" in req.headers and "application/xml" in req.accept
if result:
if is_xml_response(req):
content = result.to_xml() resp.headers['content-type'] = "application/xml"
else:
content = result.to_json() resp.headers['content-type'] = "application/json"
So any content type other than application/xml was treated as application/json and the bug never caused issues as we defauted to json for incorrect accepts.
Looks like there is a new quatum_ auth_token. py which uses incorrect behavior and is been found and fixed by Dolph.
This is how our code looks response( req):
def is_xml_
"""Returns True when the request wants an XML response, False otherwise"""
return "Accept" in req.headers and "application/xml" in req.accept
if result: response( req):
resp. headers[ 'content- type'] = "application/xml"
resp. headers[ 'content- type'] = "application/json"
if is_xml_
content = result.to_xml()
else:
content = result.to_json()
So any content type other than application/xml was treated as application/json and the bug never caused issues as we defauted to json for incorrect accepts.