wsgidav.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", "DELET E",
                 "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

BaseMiddleware(wsgidav_app, next_app, config) Abstract base middleware class (optional).
compat Tool functions to support Python 2 and 3.
safe_re_encode(s, encoding_to[, errors]) Re-encode str or binary so that is compatible with a given encoding (replacing unsupported chars).
sys This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter.
threading Thread module emulating a subset of Java’s threading model.
util Miscellaneous support functions for WsgiDAV.