本文介绍了究竟什么是 Werkzeug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自官方文档:

Werkzeug 是 Python 的 WSGI 实用程序库.

但是,当我运行 Flask Web 应用程序时,我注意到来自服务器的响应头包含:

However, when I run my Flask web application, I notice that the response header from the server contains:

HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 13
Server: Werkzeug/0.11.9 Python/2.7.10
Date: Tue, 03 May 2016 12:50:08 GMT

服务器在第四行提到了一个Werkzeug,但究竟什么是Werkzeug,它是一个像Apache这样的网络服务器吗?

On the fourth line the server is mentioning a Werkzeug, but what exactly is Werkzeug, is it a web server like Apache?

推荐答案

不,它不是像 Apache 那样的 Web 服务器.这是一个 CGI 库.由于 Apache(或您的 Flask 应用程序)可能正在使用该库来处理某些 HTTP 请求,因此它可能会将该标头添加到响应中.

No, it is not a web server like Apache. It's a CGI library. Since Apache (or your Flask application) is probably using the library to serve some HTTP requests, it probably adds that header into the response.

这篇关于究竟什么是 Werkzeug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-27 09:18