Skip to content Skip to sidebar Skip to footer

Flask - Malformed Header From Script 'app.cgi': Bad Header

I am making an AJAX call to my python script in Flask. The python script is returning a response object through jsonify. The python script is deployed in Apache24. return jsonify({

Solution 1:

I believe you need to write your return line as follows:

import Response from flask
import json
...

return Response(json.dumps({"responseList": response}),  mimetype='application/json')

Post a Comment for "Flask - Malformed Header From Script 'app.cgi': Bad Header"