File: group__mod__apreq2.html

package info (click to toggle)
rapache 1.2.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,368 kB
  • sloc: sh: 18,629; ansic: 10,417; perl: 5,675; javascript: 2,800; makefile: 307
file content (102 lines) | stat: -rw-r--r-- 7,629 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<html>
<head>
  <link rel="stylesheet" type="text/css" href="dox.css" />
  <title>libapreq2-2.05-dev: libapreq2: Apache 2.X Filter Module</title> 
</head>
<body>
<div id="page-header">
<p class="menu">
   <a href="http://www.apache.org/">Apache Software Foundation</a> &gt; <a href="http://httpd.apache.org">HTTP Server Project</a> &gt;
<a href="http://httpd.apache.org/apreq/">Request Library Subproject</a></p>
<p class="apache">Apache HTTP Server Request Library</p>
<img alt="" src="feather.gif" /></div>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Apache 2.X Filter Module<br>
<small>
[<a class="el" href="group__apreq__module.html">Modules</a>]</small>
</h1>mod_apreq2 - DSO that ties libapreq2 to <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/namespace_apache.html">Apache</a> HTTPD 2.X.  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structapreq__handle__t.html">apreq_handle_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mod__apreq2.html#ga0">apreq_handle_apache2</a> (request_rec *r)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
mod_apreq2 - DSO that ties libapreq2 to <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/namespace_apache.html">Apache</a> HTTPD 2.X. 
<p>
mod_apreq2 provides the "APREQ2" input filter for using libapreq2 (and allow its parsed data structures to be shared) within the <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/namespace_apache.html">Apache</a> 2.X webserver. Using it, libapreq2 works properly in every phase of the HTTP request, from translation handlers to output filters, and even for subrequests / internal redirects.<p>
<hr>
<p>
<h2>Activating mod_apreq2 in <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/namespace_apache.html">Apache</a> 2.X</h2>
<p>
The installation process triggered by <code>% make install</code> <em>will not modify your webserver's config file</em>. Hence, be sure you activate it on startup by adding a LoadModule directive to your webserver config; e.g.<p>
<div class="fragment"><pre class="fragment">     LoadModule    modules/mod_apreq2.so
</pre></div><p>
The mod_apreq2 filter is named "APREQ2", and may be used in Apache's input filter directives, e.g. <div class="fragment"><pre class="fragment">     AddInputFilter APREQ2         # or
     SetInputFilter APREQ2
</pre></div><p>
However, this is not required because libapreq2 will add the filter (only) if it's necessary. You just need to ensure that your module invokes <a class="el" href="group__mod__apreq2.html#ga0">apreq_handle_apache2()</a> <em>before the content handler ultimately reads from the input filter chain</em>. It is important to realize that no matter how the input filters are initially arranged, the APREQ2 filter will attempt to reposition itself to be the last input filter to read the data.<p>
If you want to use other input filters to transform the incoming HTTP request data, is important to register those filters with <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/namespace_apache.html">Apache</a> as having type AP_FTYPE_CONTENT_SET or AP_FTYPE_RESOURCE. Due to the limitations of Apache's current input filter design, types higher than AP_FTYPE_CONTENT_SET may not work properly whenever the apreq filter is active.<p>
This is especially true when a content handler uses libapreq2 to parse some of the post data before doing an internal redirect. Any input filter subsequently added to the redirected request will bypass the original apreq filter (and therefore lose access to some of the original post data), unless its type is less than the type of the apreq filter (currently AP_FTYPE_PROTOCOL-1).<p>
<h2>Server Configuration Directives</h2>
<p>
<table class="qref" border="1" cellspacing="3" cellpadding="3">
<caption align="bottom">Per-directory commands for mod_apreq2</caption>
<tr>
<th>Directive </th><th>Context </th><th>Default</th><th>Description  </th></tr>
<tr class="odd">
<td>APREQ2_ReadLimit </td><td>directory </td><td>#APREQ_DEFAULT_READ_LIMIT  </td><td>Maximum number of bytes mod_apreq2 will send off to libapreq2 for parsing. mod_apreq2 will log this event and subsequently remove itself from the filter chain.   </td></tr>
<tr>
<td>APREQ2_BrigadeLimit </td><td>directory </td><td>#APREQ_DEFAULT_BRIGADE_LIMIT </td><td>Maximum number of bytes mod_apreq2 will let accumulate within the heap-buckets in a brigade. Excess data will be spooled to an appended file bucket.   </td></tr>
<tr class="odd">
<td>APREQ2_TempDir </td><td>directory </td><td>NULL </td><td>Sets the location of the temporary directory apreq will use to spool overflow brigade data (based on the APREQ2_BrigadeLimit setting). If left unset, libapreq2 will select a platform-specific location via <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/" href="http://apr.apache.org/docs/apr/group__apr__file__io.html#gga52">apr_temp_dir_get()</a>.   </td></tr>
</table>
<p>
<h2>Implementation Details</h2>
<p>
<pre>
   XXX apreq as a normal input filter
   XXX apreq as a "virtual" content handler.
   XXX apreq as a transparent "tee".
   XXX apreq parser registration in post_config
 </pre> <hr><h2>Function Documentation</h2>
<a class="anchor" name="ga0" doxytag="apreq_module_apache2.h::apreq_handle_apache2"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="structapreq__handle__t.html">apreq_handle_t</a>* apreq_handle_apache2           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">request_rec *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>r</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create an apreq handle which communicates with an <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/" href="http://apr.apache.org/docs/apr-util/namespace_apache.html">Apache</a> 2.X request_rec.     </td>
  </tr>
</table>
<div id="footer">
<p class="apache">
Copyright &copy; 2003-2005 <a href="http://www.apache.org">The Apache Software Foundation</a>.<br/>
See <a href="apreq_license.html">LICENSE</a>.</p>
<p class="menu">
<span style="color:#aaa">page generated by <a href="http://www.doxygen.org/"><code>doxygen</code></a>
version 1.4.2 on 4 May 2005</span>
</p>
</div>
</body>
</html>