WSGI Protocol Linter
This module provides a middleware that performs sanity checks on the behavior of the WSGI server and application. It checks that the PEP 3333 WSGI spec is properly implemented. It also warns on some common HTTP errors such as non-empty responses for 304 status codes.
-
class werkzeug.middleware.lint.LintMiddleware(app)
-
Warns about common errors in the WSGI and HTTP behavior of the server and wrapped application. Some of the issues it check are:
- invalid status codes
- non-bytestrings sent to the WSGI server
- strings returned from the WSGI application
- non-empty conditional responses
- unquoted etags
- relative URLs in the Location header
- unsafe calls to wsgi.input
- unclosed iterators
Error information is emitted using the
warnings
module.Parameters: app – The WSGI application to wrap. from werkzeug.middleware.lint import LintMiddleware app = LintMiddleware(app)
© 2007–2020 Pallets
Licensed under the BSD 3-clause License.
https://werkzeug.palletsprojects.com/en/1.0.x/middleware/lint/