0.5 新版功能.
This module provides a middleware that performs sanity checks of the WSGI application. It checks that PEP 333 is properly implemented and warns on some common HTTP errors such as non-empty responses for 304 status codes.
This module provides a middleware, the LintMiddleware. Wrap your application with it and it will warn about common problems with WSGI and HTTP while your application is running.
It’s strongly recommended to use it during development.
This middleware wraps an application and warns on common errors. Among other thing it currently checks for the following problems:
Detected errors are emitted using the standard Python warnings system and usually end up on stderr.
from werkzeug.contrib.lint import LintMiddleware
app = LintMiddleware(app)
参数: | app – the application to wrap |
---|