wsgidav.mw.debug_filter#

Description

WSGI middleware used for debugging (optional).

This module dumps request and response information to the console, depending on current debug configuration.

On init:

Define HTTP methods and litmus tests, that should turn on the verbose mode (currently hard coded).

For every request:

Increase value of environ['verbose'], if the request should be debugged. Also dump request and response headers and body.

Then pass the request to the next middleware.

These configuration settings are evaluated:

verbose

This is also used by other modules. This filter adds additional information depending on the value.

verbose

Effect

<= 3

No additional output (only standard request logging).

4

Dump headers of all requests and responses.

5

Dump headers and bodies of all requests and responses.

debug_methods

Boost verbosity to 3 while processing certain request methods. This option is ignored, when verbose < 2.

Configured like:

debug_methods = ["PROPPATCH", "PROPFIND", "GET", "HEAD", "DELETE",
                 "PUT", "COPY", "MOVE", "LOCK", "UNLOCK",
                 ]
debug_litmus

Boost verbosity to 3 while processing litmus tests that contain certain substrings. This option is ignored, when verbose < 2.

Configured like:

debug_litmus = ["notowner_modify", "props: 16", ]

Classes

WsgiDavDebugFilter(wsgidav_app, next_app, config)

Other Members