class documentation

class LintMiddleware:

View In Hierarchy

Warns about common errors in the WSGI and HTTP behavior of the server and wrapped application. Some of the issues it checks are:

  • invalid status codes
  • non-bytes 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.

from werkzeug.middleware.lint import LintMiddleware
app = LintMiddleware(app)
Parameters
appThe WSGI application to wrap.
Method __call__ Undocumented
Method __init__ Undocumented
Method check​_environ Undocumented
Method check​_headers Undocumented
Method check​_iterator Undocumented
Method check​_start​_response Undocumented
Instance Variable app Undocumented
def __call__(self, *args, **kwargs):

Undocumented

Parameters
*args:t.AnyUndocumented
**kwargs:t.AnyUndocumented
Returns
t.Iterable[bytes]Undocumented
def __init__(self, app):

Undocumented

Parameters
app:WSGIApplicationUndocumented
def check_environ(self, environ):

Undocumented

Parameters
environ:WSGIEnvironmentUndocumented
def check_headers(self, headers):

Undocumented

Parameters
headers:HeadersUndocumented
def check_iterator(self, app_iter):

Undocumented

Parameters
app​_iter:t.Iterable[bytes]Undocumented
def check_start_response(self, status, headers, exc_info):

Undocumented

Parameters
status:strUndocumented
headers:t.List[t.Tuple[str, str]]Undocumented
exc​_info:t.Optional[t.Tuple[t.Type[BaseException], BaseException, TracebackType]]Undocumented
Returns
t.Tuple[int, Headers]Undocumented
app =

Undocumented