apache 2.x filter module(3)

NAME

Apache 2.X Filter Module - mod_apreq - DSO that ties
libapreq2 to Apache 2.X.
Defines
#define APREQ_MODULE_NAME 'APACHE2' #define APREQ_MODULE_MAGIC_NUMBER 20040809

Detailed Description

mod_apreq - DSO that ties libapreq2 to Apache 2.X.

mod_apreq provides the 'APREQ' 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.
Activating mod_apreq in Apache 2.X
Normally the installation process triggered by make
install will make the necessary changes to httpd.conf for
you. In any case, after installing the mod_apreq.so
module, be sure your webserver's httpd.conf activates it
on startup with a LoadModule directive, e.g.

LoadModule modules/mod_apreq.so
The mod_apreq filter is named 'APREQ', and may be used in
Apache's input filter directives, e.g.

AddInputFilter APREQ # or
SetInputFilter APREQ
However, this is not required because libapreq2 will add
the filter (only) if it's necessary. You just need to
ensure that your module instantiates an apreq_request_t using apreq_request() before the content handler ultimately reads from the input filter chain. It is important to recognize that no matter how the input
filters are initially arranged, the APREQ filter will
attempt to reposition itself to be the last input filter
to read the data.
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.
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).
Server Configuration Directives
DirectiveContextDefaultDescription
APREQ_MaxBodydirectory-1 (Unlimited)Maximum number of
bytes mod_apreq will send off to libapreq for parsing.
mod_apreq will log this event and remove itself from the
filter chain. The APR_EGENERAL error will be reported to
libapreq2 users via the return value of apreq_env_read(). APREQ_MaxBrigadedirectoryAPREQ_MAX_BRIGADE_LEN Maximum number of bytes apreq will allow to accumulate within a
brigade. Excess data will be spooled to a file bucket
appended to the brigade. APREQ_TempDirdirectoryNULLSets
the location of the temporary directory apreq will use to
spool overflow brigade data (based on the APREQ_MaxBrigade
setting). If left unset, libapreq2 will select a platformspecific location via apr_temp_dir_get(). Per-directory commands for mod_apreq
Implementation Details
XXX apreq as a normal input filter
XXX apreq as a 'virtual' content handler.
XXX apreq as a transparent 'tee'.
Copyright © 2010-2025 Platon Technologies, s.r.o.           Index | Man stránky | tLDP | Dokumenty | Utilitky | O projekte
Design by styleshout