Skip to content
rlauer6Public
forked from apache/apreq

About

Mirror of Apache HTTP Request Library

Resources

Stars

2 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

                    Apache HTTP Server Request Library

What is it?
-----------

libapreq2 is a library for parsing HTTP cookies, query strings, and
request bodies, including multipart form data. It is built on the Apache
Portable Runtime (APR) and APR-util libraries.

The project originated within the Apache HTTP Server Project. The
original libapreq-1.x was designed by Lincoln Stein and Doug MacEachern.
libapreq2 provides an updated C API, an Apache HTTP Server 2.x module,
and Perl bindings for mod_perl2.

The C components are:

  1. libapreq2, a shared library based on APR and APR-util.
  2. mod_apreq2, an Apache HTTP Server input-filter module.
  3. CGI and custom-environment interfaces to the C library.

The Perl API includes Apache2::Request, Apache2::Cookie, and
Apache2::Upload, together with APR::Request modules. The XS bindings
are generated using ExtUtils::XSBuilder.

Maintenance and latest version
------------------------------

The Apache HTTP Server Project archived the original repository in
May 2026. This repository is an independently maintained fork intended
to preserve and extend support for libapreq2, mod_apreq2, and the Perl
bindings. It is not an official Apache Software Foundation project.

Maintained source, releases, issues, and pull requests:

    https://github.com/rlauer6/apreq

Original Apache project page (archived):

    https://httpd.apache.org/apreq/

Installation
------------

See INSTALL for detailed platform-specific prerequisites and options.
The build requires an appropriate C compiler, APR and APR-util development
files, and Apache HTTP Server development files for the Apache module.
Building Perl support additionally requires Perl, mod_perl2,
Apache::Test, ExtUtils::MakeMaker, and ExtUtils::XSBuilder.

To build the C library and environment modules from a prepared source
distribution on a Unix-like system:

    ./configure --with-apache2-apxs=/path/to/apache2/bin/apxs
    make
    make test
    make install

To configure and build the complete distribution, including Perl bindings:

    perl Makefile.PL --with-apache2-apxs=/path/to/apache2/bin/apxs
    make
    make test
    make install

The top-level Makefile.PL enables Perl support and invokes Autoconf.
Do not confuse it with glue/perl/Makefile.PL, which configures only the
Perl XS portion of the build.

To install a published CPAN release tarball with a CPAN client, use the
client's normal distribution-installation procedure. The release includes
META.yml and generates MYMETA.yml and MYMETA.json during configuration.
The Apache, APR, and compiler prerequisites are native dependencies and
must already be available on the target system.

Creating a release tarball
--------------------------

Run the following commands from the top-level directory of a Git checkout.

The buildconf step requires Autoconf, Automake, Libtool, and
ExtUtils::XSBuilder, in addition to the normal build prerequisites.

If the Perl build dependencies are not already installed, they can
be installed into a local library using a CPAN client such as cpm:

    cpm install -L local Apache::Test mod_perl2 ExtUtils::XSBuilder

Make the locally installed modules available to Perl:

    export PERL5LIB="$PWD/local/lib/perl5"

Perl must be able to locate ExtUtils::XSBuilder before buildconf
can run successfully.

Create the distribution:

    ./buildconf
    perl Makefile.PL
    make release

The top-level Makefile.PL generates META.yml when necessary and
creates MYMETA.yml and MYMETA.json for CPAN installers. The release
target uses the generated metadata when assembling the distribution

Use --with-apache2-apxs=/path/to/apxs with Makefile.PL if apxs cannot
be found automatically.

Neither 'make' nor 'make test' is required to create the release
tarball. However, the resulting archive should be built and tested
before publication.

The release target generates libapreq2-VERSION.tar.gz, including the
CPAN metadata and manifest, together with SHA-256 and SHA-512 checksums.

Development and testing
-----------------------

From a Git checkout, run './buildconf' before the initial configuration;
a release tarball already contains the generated Autotools infrastructure.
After configuration, 'make' builds the C library, Apache module, and,
when enabled, the Perl bindings. Use 'make test' to run their test suites.

The Apache::Test suites start isolated Apache servers. Their generated
configuration templates are derived from source templates under
build/templates/ and use the module directory reported by apxs to load
required Apache modules conditionally. The generated extra.conf.in files
should not be edited directly.

See glue/perl/README for Perl XS development notes. That file is not the
release procedure for the complete distribution.

Documentation
-------------

API documentation is maintained in the source tree. The optional HTML
documentation can be generated from the top-level directory with:

    make docs

This uses Doxygen and may require APR and APR-util source documentation
files that are not installed by every operating-system package. Building
HTML documentation is not required for creating the CPAN tarball.

Licensing
---------

See LICENSE and NOTICE. The historical Apache attribution is retained.

Contacts
--------

For issues, bug reports, and contributions to this maintained fork, use:

    https://github.com/rlauer6/apreq

Historical Apache project resources:

    https://httpd.apache.org/apreq/
    apreq-dev@httpd.apache.org
    modperl@perl.apache.org

These historical mailing lists are not the support or contribution
channels for the independently maintained fork.

Acknowledgments
---------------

The project relies on GNU Autotools for its build system; Apache::Test,
Test::Harness, and Test::Inline for testing; Doxygen for optional API
reference generation; and ExtUtils::XSBuilder for its Perl XS bindings.

We acknowledge the original Apache HTTP Server Project contributors and
the authors of libapreq and its language bindings.

About

Mirror of Apache HTTP Request Library

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages