使用
clen = os.path.getsize(the_file)
response['content-disposition'] = "attachment; filename=%s" % filename
response['content-length'] = clen
return response
导致响应标头仅包含内容配置,而不包含内容长度 如果我添加一个无意义的标题,如
response['bla'] = 'some non-sense'
它完美地出现在响应中。是否有其他地方覆盖头文件或其他内容。我在uwsgi中使用了nginx。
答案 0 :(得分:0)
Content-Length 。