我正在尝试使用gevent std::optional
WSGIServer
我正在使用if __name__ == "__main__":
app_host = "0.0.0.0"
app_port = "8080"
#app.run(host=app_host, port=app_port, debug=False)
http_server = WSGIServer((app_host, app_port), app)
logging.info("Starting the App server")
http_server.serve_forever()
运行应用服务器。每当我尝试获取任何数据,例如
gevent WSGIServer
收到以下错误
token = request.headers["access_token"]
答案 0 :(得分:0)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
new Thread() {
public void run() {
Document doc;
try {
doc = Jsoup.connect("http://google.comt/").get();
runOnUiThread( new Runnable()
{
public void run()
{
// do stuff
}
});
} catch (IOException e) {
e.printStackTrace();
if (System.nanoTime() <= 10000000000L) { // 10 seconds
run(); // RECURSIVE CALL
}
}
}
}.start
}
有一个叫做pywsgi
的东西。这样做是为了防止潜在的敏感信息(如HTTP授权和cookie)被意外打印或记录。
一个人可以在official documentation
上阅读更多内容由于我在标题中传递了SecureEnviron
作为键并试图从代码中访问它,所以它之所以提高access_token
是因为它不是KeyError: 'HTTP_ACCESS_TOKEN'
的一部分。
我使用whitelist_keys
作为标题键,它的工作原理很像魅力。将Authorization
添加到access_token
中也可以做到这一点。