1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8 <title>mod_filter - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
20 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_filter</h1>
24 <p><span>Available Languages: </span><a href="../en/mod/mod_filter.html" title="English"> en </a></p>
26 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Context-sensitive smart filter configuration module</td></tr>
27 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
28 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>filter_module</td></tr>
29 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_filter.c</td></tr>
30 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Version 2.1 and later</td></tr></table>
33 <p>This module enables smart, context-sensitive configuration of
34 output content filters. For example, apache can be configured to
35 process different content-types through different filters, even
36 when the content-type is not known in advance (e.g. in a proxy).</p>
38 <p><code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> works by introducing indirection into
39 the filter chain. Instead of inserting filters in the chain, we insert
40 a filter harness which in turn dispatches conditionally
41 to a filter provider. Any content filter may be used as a provider
42 to <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code>; no change to existing filter modules is
43 required (although it may be possible to simplify them).</p>
45 <div id="quickview"><h3 class="directives">Directives</h3>
47 <li><img alt="" src="../images/down.gif" /> <a href="#filterchain">FilterChain</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#filterdeclare">FilterDeclare</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#filterprotocol">FilterProtocol</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#filterprovider">FilterProvider</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#filtertrace">FilterTrace</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#smart">Smart Filtering</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#terms">Filter Declarations, Providers and Chains</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#config">Configuring the Chain</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#upgrade">Upgrading from HTTPD 2.2 Configuration</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol Handling</a></li>
62 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
64 <h2><a name="smart" id="smart">Smart Filtering</a></h2>
65 <p>In the traditional filtering model, filters are inserted unconditionally
66 using <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code> and family.
67 Each filter then needs to determine whether to run, and there is little
68 flexibility available for server admins to allow the chain to be
69 configured dynamically.</p>
71 <p><code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> by contrast gives server administrators a
72 great deal of flexibility in configuring the filter chain. In fact,
73 filters can be inserted based on any Request Header, Response Header
74 or Environment Variable. This generalises the limited flexibility offered
75 by <code class="directive"><a href="../mod/core.html#addoutputfilterbytype">AddOutputFilterByType</a></code>, and fixes
76 it to work correctly with dynamic content, regardless of the
77 content generator. The ability to dispatch based on Environment
78 Variables offers the full flexibility of configuration with
79 <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> to anyone who needs it.</p>
80 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
82 <h2><a name="terms" id="terms">Filter Declarations, Providers and Chains</a></h2>
84 <img src="../images/mod_filter_old.gif" width="160" height="310" alt="[This image displays the traditional filter model]" /><br />
85 <dfn>Figure 1:</dfn> The traditional filter model</p>
87 <p>In the traditional model, output filters are a simple chain
88 from the content generator (handler) to the client. This works well
89 provided the filter chain can be correctly configured, but presents
90 problems when the filters need to be configured dynamically based on
91 the outcome of the handler.</p>
94 <img src="../images/mod_filter_new.gif" width="423" height="331" alt="[This image shows the mod_filter model]" /><br />
95 <dfn>Figure 2:</dfn> The <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> model</p>
97 <p><code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> works by introducing indirection into
98 the filter chain. Instead of inserting filters in the chain, we insert
99 a filter harness which in turn dispatches conditionally
100 to a filter provider. Any content filter may be used as a provider
101 to <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code>; no change to existing filter modules
102 is required (although it may be possible to simplify them). There can be
103 multiple providers for one filter, but no more than one provider will
104 run for any single request.</p>
106 <p>A filter chain comprises any number of instances of the filter
107 harness, each of which may have any number of providers. A special
108 case is that of a single provider with unconditional dispatch: this
109 is equivalent to inserting the provider filter directly into the chain.</p>
110 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
111 <div class="section">
112 <h2><a name="config" id="config">Configuring the Chain</a></h2>
113 <p>There are three stages to configuring a filter chain with
114 <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code>. For details of the directives, see below.</p>
117 <dt>Declare Filters</dt>
118 <dd>The <code class="directive"><a href="#filterdeclare">FilterDeclare</a></code> directive
119 declares a filter, assigning it a name and filter type. Required
120 only if the filter is not the default type AP_FTYPE_RESOURCE.</dd>
122 <dt>Register Providers</dt>
123 <dd>The <code class="directive"><a href="#filterprovider">FilterProvider</a></code>
124 directive registers a provider with a filter. The filter may have
125 been declared with <code class="directive"><a href="#filterdeclare">FilterDeclare</a></code>; if not, FilterProvider will implicitly
126 declare it with the default type AP_FTYPE_RESOURCE. The provider
128 registered with <code>ap_register_output_filter</code> by some module.
129 The final argument to <code class="directive"><a href="#filterprovider">FilterProvider</a></code> is an expression: the provider will be
130 selected to run for a request if and only if the expression evaluates
131 to true. The expression may evaluate HTTP request or response
132 headers, environment variables, or the Handler used by this request.
133 Unlike earlier versions, mod_filter now supports complex expressions
134 involving multiple criteria with AND / OR logic (&& / ||)
137 <dt>Configure the Chain</dt>
138 <dd>The above directives build components of a smart filter chain,
139 but do not configure it to run. The <code class="directive"><a href="#filterchain">FilterChain</a></code> directive builds a filter chain from smart
140 filters declared, offering the flexibility to insert filters at the
141 beginning or end of the chain, remove a filter, or clear the chain.</dd>
143 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
144 <div class="section">
145 <h2><a name="upgrade" id="upgrade">Upgrading from HTTPD 2.2 Configuration</a></h2>
146 <p>The <code class="directive"><a href="#filterprovider">FilterProvider</a></code>
147 directive has changed from HTTPD 2.2: the <var>match</var> and
148 <var>dispatch</var> arguments are replaced with a single but
149 more versatile <var>expression</var>. In general, you can convert
150 a match/dispatch pair to the two sides of an expression, using
152 <div class="example"><p><code>"dispatch = match"</code></p></div>
153 <p>The Request headers, Response headers and Environment variables
154 are now interpreted from syntax <var>$req{foo}</var>,
155 <var>$resp{foo}</var> and <var>$env{foo}</var> respectively.
156 The variables <var>$handler</var> and <var>$Content-Type</var>
157 are also supported.</p>
158 <p>Note that the match no longer supports integer comparisons
159 or substring matches. The latter can be replaced by regular
160 expression matches.</p>
161 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
162 <div class="section">
163 <h2><a name="examples" id="examples">Examples</a></h2>
165 <dt>Server side Includes (SSI)</dt>
166 <dd>A simple case of using <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> in place of
167 <code class="directive"><a href="../mod/core.html#addoutputfilterbytype">AddOutputFilterByType</a></code>
168 <div class="example"><p><code>
169 FilterDeclare SSI<br />
170 FilterProvider SSI INCLUDES "$resp{Content-Type} = /^text\/html/"<br />
175 <dt>Server side Includes (SSI)</dt>
176 <dd>The same as the above but dispatching on handler (classic
177 SSI behaviour; .shtml files get processed).
178 <div class="example"><p><code>
179 FilterProvider SSI INCLUDES "Handler = server-parsed"<br />
184 <dt>Emulating mod_gzip with mod_deflate</dt>
185 <dd>Insert INFLATE filter only if "gzip" is NOT in the
186 Accept-Encoding header. This filter runs with ftype CONTENT_SET.
187 <div class="example"><p><code>
188 FilterDeclare gzip CONTENT_SET<br />
189 FilterProvider gzip inflate "$req{Accept-Encoding} != /gzip/"<br />
194 <dt>Image Downsampling</dt>
195 <dd>Suppose we want to downsample all web images, and have filters
196 for GIF, JPEG and PNG.
197 <div class="example"><p><code>
198 FilterProvider unpack jpeg_unpack "$resp{Content-Type} = image/jpeg"<br />
199 FilterProvider unpack gif_unpack "$resp{Content-Type} = image/gif"<br />
200 FilterProvider unpack png_unpack "$resp{Content-Type} = image/png"<br />
202 FilterProvider downsample downsample_filter "$resp{Content-Type} = /image\/(jpeg|gif|png)/"<br />
203 FilterProtocol downsample "change=yes"<br />
205 FilterProvider repack jpeg_pack "$resp{Content-Type} = image/jpeg"<br />
206 FilterProvider repack gif_pack "$resp{Content-Type} = image/gif"<br />
207 FilterProvider repack png_pack "$resp{Content-Type} = image/png"<br />
208 <Location /image-filter><br />
209 <span class="indent">
210 FilterChain unpack downsample repack<br />
216 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
217 <div class="section">
218 <h2><a name="protocol" id="protocol">Protocol Handling</a></h2>
219 <p>Historically, each filter is responsible for ensuring that whatever
220 changes it makes are correctly represented in the HTTP response headers,
221 and that it does not run when it would make an illegal change. This
222 imposes a burden on filter authors to re-implement some common
223 functionality in every filter:</p>
226 <li>Many filters will change the content, invalidating existing content
227 tags, checksums, hashes, and lengths.</li>
229 <li>Filters that require an entire, unbroken response in input need to
230 ensure they don't get byteranges from a backend.</li>
232 <li>Filters that transform output in a filter need to ensure they don't
233 violate a <code>Cache-Control: no-transform</code> header from the
236 <li>Filters may make responses uncacheable.</li>
239 <p><code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> aims to offer generic handling of these
240 details of filter implementation, reducing the complexity required of
241 content filter modules. This is work-in-progress; the
242 <code class="directive"><a href="#filterprotocol">FilterProtocol</a></code> implements
243 some of this functionality for back-compatibility with Apache 2.0
244 modules. For httpd 2.1 and later, the
245 <code>ap_register_output_filter_protocol</code> and
246 <code>ap_filter_protocol</code> API enables filter modules to
247 declare their own behaviour.</p>
249 <p>At the same time, <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> should not interfere
250 with a filter that wants to handle all aspects of the protocol. By
251 default (i.e. in the absence of any <code class="directive"><a href="#filterprotocol">FilterProtocol</a></code> directives), <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code>
252 will leave the headers untouched.</p>
254 <p>At the time of writing, this feature is largely untested,
255 as modules in common use are designed to work with 2.0.
256 Modules using it should test it carefully.</p>
258 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
259 <div class="directive-section"><h2><a name="FilterChain" id="FilterChain">FilterChain</a> <a name="filterchain" id="filterchain">Directive</a></h2>
260 <table class="directive">
261 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure the filter chain</td></tr>
262 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FilterChain [+=-@!]<var>filter-name</var> <var>...</var></code></td></tr>
263 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
264 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
265 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
266 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_filter</td></tr>
268 <p>This configures an actual filter chain, from declared filters.
269 <code class="directive">FilterChain</code> takes any number of arguments,
270 each optionally preceded with a single-character control that
271 determines what to do:</p>
274 <dt><code>+<var>filter-name</var></code></dt>
275 <dd>Add <var>filter-name</var> to the end of the filter chain</dd>
277 <dt><code>@<var>filter-name</var></code></dt>
278 <dd>Insert <var>filter-name</var> at the start of the filter chain</dd>
280 <dt><code>-<var>filter-name</var></code></dt>
281 <dd>Remove <var>filter-name</var> from the filter chain</dd>
283 <dt><code>=<var>filter-name</var></code></dt>
284 <dd>Empty the filter chain and insert <var>filter-name</var></dd>
286 <dt><code>!</code></dt>
287 <dd>Empty the filter chain</dd>
289 <dt><code><var>filter-name</var></code></dt>
290 <dd>Equivalent to <code>+<var>filter-name</var></code></dd>
294 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
295 <div class="directive-section"><h2><a name="FilterDeclare" id="FilterDeclare">FilterDeclare</a> <a name="filterdeclare" id="filterdeclare">Directive</a></h2>
296 <table class="directive">
297 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Declare a smart filter</td></tr>
298 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FilterDeclare <var>filter-name</var> <var>[type]</var></code></td></tr>
299 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
300 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
301 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
302 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_filter</td></tr>
304 <p>This directive declares an output filter together with a
305 header or environment variable that will determine runtime
306 configuration. The first argument is a <var>filter-name</var>
307 for use in <code class="directive"><a href="#filterprovider">FilterProvider</a></code>,
308 <code class="directive"><a href="#filterchain">FilterChain</a></code> and
309 <code class="directive"><a href="#filterprotocol">FilterProtocol</a></code> directives.</p>
311 <p>The final (optional) argument
312 is the type of filter, and takes values of <code>ap_filter_type</code>
313 - namely <code>RESOURCE</code> (the default), <code>CONTENT_SET</code>,
314 <code>PROTOCOL</code>, <code>TRANSCODE</code>, <code>CONNECTION</code>
315 or <code>NETWORK</code>.</p>
318 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
319 <div class="directive-section"><h2><a name="FilterProtocol" id="FilterProtocol">FilterProtocol</a> <a name="filterprotocol" id="filterprotocol">Directive</a></h2>
320 <table class="directive">
321 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Deal with correct HTTP protocol handling</td></tr>
322 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FilterProtocol <var>filter-name</var> [<var>provider-name</var>]
323 <var>proto-flags</var></code></td></tr>
324 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
325 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
326 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
327 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_filter</td></tr>
329 <p>This directs <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> to deal with ensuring the
330 filter doesn't run when it shouldn't, and that the HTTP response
331 headers are correctly set taking into account the effects of the
334 <p>There are two forms of this directive. With three arguments, it
335 applies specifically to a <var>filter-name</var> and a
336 <var>provider-name</var> for that filter.
337 With two arguments it applies to a <var>filter-name</var> whenever the
338 filter runs <em>any</em> provider.</p>
340 <p><var>proto-flags</var> is one or more of</p>
343 <dt><code>change=yes</code></dt>
344 <dd>The filter changes the content, including possibly the content
347 <dt><code>change=1:1</code></dt>
348 <dd>The filter changes the content, but will not change the content
351 <dt><code>byteranges=no</code></dt>
352 <dd>The filter cannot work on byteranges and requires complete input</dd>
354 <dt><code>proxy=no</code></dt>
355 <dd>The filter should not run in a proxy context</dd>
357 <dt><code>proxy=transform</code></dt>
358 <dd>The filter transforms the response in a manner incompatible with
359 the HTTP <code>Cache-Control: no-transform</code> header.</dd>
361 <dt><code>cache=no</code></dt>
362 <dd>The filter renders the output uncacheable (eg by introducing randomised
363 content changes)</dd>
367 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
368 <div class="directive-section"><h2><a name="FilterProvider" id="FilterProvider">FilterProvider</a> <a name="filterprovider" id="filterprovider">Directive</a></h2>
369 <table class="directive">
370 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Register a content filter</td></tr>
371 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FilterProvider <var>filter-name</var> <var>provider-name</var>
372 <var>expression</var></code></td></tr>
373 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
374 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
375 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
376 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_filter</td></tr>
378 <p>This directive registers a <em>provider</em> for the smart filter.
379 The provider will be called if and only if the <var>expression</var>
380 declared evaluates to true when the harness is first called.</p>
383 <var>provider-name</var> must have been registered by loading
384 a module that registers the name with
385 <code>ap_register_output_filter</code>.
388 <p><var>expression</var> can be any of the following:</p>
390 <dt><code><var>string</var></code></dt>
391 <dd>true if <var>string</var> is not empty</dd>
393 <dt><code><var>string1</var> = <var>string2</var><br />
394 <var>string1</var> == <var>string2</var><br />
395 <var>string1</var> != <var>string2</var></code></dt>
397 <dd><p>Compare <var>string1</var> with <var>string2</var>. If
398 <var>string2</var> has the form <code>/<var>string2</var>/</code>
399 then it is treated as a regular expression. Regular expressions are
400 implemented by the <a href="http://www.pcre.org">PCRE</a> engine and
401 have the same syntax as those in <a href="http://www.perl.com">perl
402 5</a>. Note that <code>==</code> is just an alias for <code>=</code>
403 and behaves exactly the same way.</p>
406 <dt><code><var>string1</var> < <var>string2</var><br />
407 <var>string1</var> <= <var>string2</var><br />
408 <var>string1</var> > <var>string2</var><br />
409 <var>string1</var> >= <var>string2</var></code></dt>
411 <dd>Compare <var>string1</var> with <var>string2</var>. Note, that
412 strings are compared <em>literally</em> (using
413 <code>strcmp(3)</code>). Therefore the string "100" is less than
416 <dt><code>( <var>expression</var> )</code></dt>
417 <dd>true if <var>expression</var> is true</dd>
419 <dt><code>! <var>expression</var></code></dt>
420 <dd>true if <var>expression</var> is false</dd>
422 <dt><code><var>expression1</var> &&
423 <var>expression2</var></code></dt>
424 <dd>true if both <var>expression1</var> and
425 <var>expression2</var> are true</dd>
427 <dt><code><var>expression1</var> ||
428 <var>expression2</var></code></dt>
429 <dd>true if either <var>expression1</var> or
430 <var>expression2</var> is true</dd>
435 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
436 <div class="directive-section"><h2><a name="FilterTrace" id="FilterTrace">FilterTrace</a> <a name="filtertrace" id="filtertrace">Directive</a></h2>
437 <table class="directive">
438 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Get debug/diagnostic information from
439 <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code></td></tr>
440 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FilterTrace <var>filter-name</var> <var>level</var></code></td></tr>
441 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
442 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
443 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_filter</td></tr>
445 <p>This directive generates debug information from
446 <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code>.
447 It is designed to help test and debug providers (filter modules), although
448 it may also help with <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> itself.</p>
450 <p>The debug output depends on the <var>level</var> set:</p>
452 <dt><code>0</code> (default)</dt>
453 <dd>No debug information is generated.</dd>
455 <dt><code>1</code></dt>
456 <dd><code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code> will record buckets and brigades
457 passing through the filter to the error log, before the provider has
458 processed them. This is similar to the information generated by
459 <a href="http://apache.webthing.com/mod_diagnostics/">mod_diagnostics</a>.
462 <dt><code>2</code> (not yet implemented)</dt>
463 <dd>Will dump the full data passing through to a tempfile before the
464 provider. <strong>For single-user debug only</strong>; this will not
465 support concurrent hits.</dd>
470 <div class="bottomlang">
471 <p><span>Available Languages: </span><a href="../en/mod/mod_filter.html" title="English"> en </a></p>
472 </div><div id="footer">
473 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
474 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>