.TH "mod_apreq2" 3 "Wed Mar 10 2021" "Version 2.16" "libapreq2" \" -*- nroff -*-
.ad l
.nh
.SH NAME
mod_apreq2 \- Apache 2\&.X Filter Module
.PP
 \- mod_apreq2 - DSO that ties libapreq2 to Apache HTTPD 2\&.X\&.  

.SH SYNOPSIS
.br
.PP
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBAPREQ_FILTER_NAME\fP   'apreq2'"
.br
.ti -1c
.RI "#define \fBAPREQ_APACHE2_MMN\fP   20101207"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBapreq_handle_t\fP * \fBapreq_handle_apache2\fP (request_rec *r)"
.br
.ti -1c
.RI "\fBAPR_DECLARE_OPTIONAL_FN\fP (\fBapreq_handle_t\fP *, \fBapreq_handle_apache2\fP,(request_rec *r))"
.br
.in -1c
.SH "Detailed Description"
.PP 
mod_apreq2 - DSO that ties libapreq2 to Apache HTTPD 2\&.X\&. 

mod_apreq2 provides the 'APREQ2' input filter for using libapreq2 (and allow its parsed data structures to be shared) within the Apache 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\&.
.PP
.PP
.PP
.SS "Activating mod_apreq2 in Apache 2\&.X"
.PP
The installation process triggered by \fC% make install\fP \fIwill not modify your webserver's config file\fP\&. Hence, be sure you activate it on startup by adding a LoadModule directive to your webserver config; e\&.g\&.
.PP
.PP
.nf
LoadModule apreq_module    modules/mod_apreq2\&.so
.fi
.PP
.PP
The mod_apreq2 filter is named 'apreq2', and may be used in Apache's input filter directives, e\&.g\&. 
.PP
.nf
AddInputFilter apreq2         # or
SetInputFilter apreq2

.fi
.PP
.PP
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 \fBapreq_handle_apache2()\fP \fIbefore the content handler ultimately reads from the input filter chain\fP\&. 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\&.
.PP
If you want to use other input filters to transform the incoming HTTP request data, is important to register those filters with Apache 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\&.
.PP
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)\&.
.PP
.SS "Server Configuration Directives"
.PP
Per-directory commands for mod_apreq2Directive Context DefaultDescription  APREQ2_ReadLimit directory \fBAPREQ_DEFAULT_READ_LIMIT\fP  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\&.   APREQ2_BrigadeLimit directory \fBAPREQ_DEFAULT_BRIGADE_LIMIT\fP 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\&.   APREQ2_TempDir directory NULL 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 apr_temp_dir_get()\&.   
.PP
.SS "Implementation Details"
.PP
.PP
.nf

  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
.fi
.PP
 
.SH "Macro Definition Documentation"
.PP 
.SS "#define APREQ_APACHE2_MMN   20101207"
The Apache2 Module Magic Number for use in the Apache 2\&.x module structures This gets bumped if changes in th4e API will break third party applications using this apache2 module 
.PP
\fBSee also\fP
.RS 4
\fBAPREQ_MODULE\fP 
.RE
.PP

.SS "#define APREQ_FILTER_NAME   'apreq2'"
The mod_apreq2 filter is named 'apreq2', and may be used in Apache's input filter directives, e\&.g\&. 
.PP
.nf
AddInputFilter apreq2         # or
SetInputFilter apreq2

.fi
.PP
 See above 
.SH "Function Documentation"
.PP 
.SS "\fBapreq_handle_t\fP* apreq_handle_apache2 (request_rec * r)"
Create an apreq handle which communicates with an Apache 2\&.X request_rec\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for libapreq2 from the source code\&.