Django Response always Chunked with text/html cannot set Content-Length
问题 In my Django Application's views.py , I return an HttpResponse object after attempting to set the following HTTP Header fields: # Create a Response Object with the content to return response = HttpResponse("%s"%(output_display),mimetype='text/html') response['Cache-Control'] = 'must-revalidate, max-age=20' response['Vary'] = 'Accept-Encoding' response['Transfer-Encoding'] = 'gzip' #response['Content-Encoding'] = 'gzip' response['Connection'] = 'close' #response['Content-Type'] = 'text/html'