当我尝试使用以下功能将文件存储到请求该文件的用户时:
# Prepare selected file for download...
filepath = '/home/nikos/wsgi/static/files/'
send_from_directory( filepath, filename, as_attachment=True )
我收到错误消息:
Bad Request
The browser (or proxy) sent a request that this server could not understand.
为什么错误不是提供文件,而是提到代理或错误的请求?
该脚本是在httpd.conf
WSGIPassAuthorization On
的mod_wsgi脚本。