=head1 NAME

Changes - Apache mod_perl changes logfile

=head1 CHANGES

all changes without author attribution are by Doug MacEachern

Also refer to the Apache::Test changes log file, at Apache-Test/Changes

=over 3

=item 2.0.2 - October 20, 2005

add :proxy import tag to Apache2::Const which exposes new
constants PROXYREQ_NONE, PROXYREQ_PROXY, and PROXYREQ_REVERSE
[Geoffrey Young]

$0 Fixes : [Gozer]
- Setting $0 works on Linux again
- HP-UX and *BSDes show the correct process name instead of '-e'
 
Fix a critical but trivial bug that would cause MP_MAINTAINER=1
or MP_TRACE=1 builds to fail if not building against a threaded APR.
Functions such as apr_os_thread_current() would not be linked in,
but were expected to be.
[Philip M. Gollucci]

Add the output of ldd(unix/cygwin) and otool -L (darwin)
for httpd to the mp2bug report script.
[Philip M. Gollucci]

Prevent tools such as Apache2::Status's Loaded Modules screen
from displaying erroneous information about mod_perl.pm being loaded.
[Stas, Philip M. Gollucci]

Correctly set the version of ModPerl::MethodLookup, previously,
it was not set because of the way it was Generating via ModPerl::WrapXS.
[Philip M. Gollucci]

Improve the detection of whether or not we are in an mp2 build tree.
This allows usage of ExtUtils::MakeMaker options such as PREFIX to
not break the probe of mp2 build trees.
[Stas, Philip M. Gollucci]

Add support for the newer Smaps (/proc/self/statm) on Linux
systems that support it (i.e. linux-2.6.13-rc4-mm1)
to accurately count the amount of shared memory.
[Torsten Foertsch <torsten.foertsch gmx.net>]

On cygwin some dlls might happen to be with identical base addresses
and if you try to load both of them you'll get an error and you'll
have to use the rebase utility to fix them.  this fix should prevent
this.  [Nikolay Ananiev <ananiev@thegdb.com>]

Fix an undefined warning in DSO builds when not using MP_APXS.
[Nikolay Ananiev <ananiev@thegdb.com>]

When running Makefile.PL with the MP_MAINTAINER=1 option
add -Wdeclaration-after-statement if we are using gcc
version 3.3.2 or higher and its not already part of the ccopts.
[Philip M. Gollucci, Gozer]

Several fixes to Apache2::Status
[Philip M. Gollucci]

When using Apache2::Reload and ReloadDebug is set to 'On', 
sort the output alphabetically [Philip M. Gollucci]

croak in case a filter returns DECLINED after calling $f->read (as it
is not supposed to happen) [Stas]

another round of cygwin fixes [Nikolay Ananiev <ananiev@thegdb.com>]

Multiple fixes to make mod_perl 2.0 work with blead-perl (5.9.3+)
[Stas]

t/modules/reload.t would fail if run more than 3 times, breaking
smokes [Gozer]

filter flushing now doesn't croak on connection reset
(ECONNRESET/ECONNABORTED), but just logs the event on the 'info'
level. [Stas]

RPM Friendly builds : [Gozer]
- make dist tarballs can now be built directly into RPMs with rpmbuild
- Added a new target 'make rpm' to directly build rpms from a checkout



=item 2.0.1 - June 17, 2005

B::Terse has problems with XS code, so adjust Apache::Status to eval
{} the code doing Syntax Tree Dump: syntax and execution order options
[Stas]

Fix a broken regexp in Apache2::Build::dir() on win32 that would
incorrectly attempt to fully-qualify paths like c:/some/path
[Nikolay Ananiev <ananiev@thegdb.com>]

Fix the "No library found" warnings when building on win32 without
apxs and MP_AP_PREFIX [Nikolay Ananiev <ananiev@thegdb.com>]

The pure-perl ModPerl::Util::unload_package implementation was
accidently deleting sub-stashes [Gozer]

If running Makefile.PL unnatended (STDIN isn't a terminal or
MP_PROMPT_DEFAULT=1), break out of potentially infinite prompt
loops [Gozer]

fix ModPerl::TestReport used by t/REPORT and mp2bug to use
ExtUtils::MakeMaker's MM->parse_version to get the interesting
packages version number, w/o trying to load them (which may fail if
the environment is not right) [Stas]

fix a bug in ModPerl::RegistryCooker: now stripping __(END|DATA)__
only at the beginning of the line [Stas]

APR::Base64 : [Torsten Foertsch <torsten.foertsch@gmx.net>]
- fix encode_len() to return the length without accounting for the
terminating '\0' as the C API does. 
- fix encode() to create the string of the correct length (previously
was creating one too many)

in mod_perl callbacks merge error-notes entries rather than store just
the newest error [Mark <mark@immermail.com>]

Expose Apache2::Const::EXEC_ON_READ (added to the :override group)
[Stas]

Fix a bug in custom directive implementation, where the code called
from modperl_module_config_merge() was setting the global context
after selecting the new interpreter which was leading to a segfault in
any handler called thereafter, whose context was different
beforehand. [Stas]



=item 2.0.0 - May 20, 2005

fix global anon_cnt double-initialization bug that was causing
startup segfaults on OSX. [Gozer]

fix the ap_install target in the top-level Makefile (used for static
build) [Stas]

Reintroduce a pure-Perl version of ModPerl::Util::unload_package()
The problematic XS version is now called unload_package_xs() and
not used by default [Gozer]

More APR::Status wrappers:  [Stas, Randy Kobes]
- is_EOF
- is_ECONNABORTED
- is_ECONNRESET
- is_TIMEUP

make sure that the build picks up the include directories based on the
apxs queries and only search the httpd source if $self->{MP_AP_PREFIX}
was set. Earlier it was always picking the headers from the httpd
source if it was available, which was resulting in the wrong headers
if the installed httpd was different than the source that was found
[Stas]

introduce ModPerl::RegistryPrefork and ModPerl::PerlRunPrefork, which
behave the same as ModPerl::Registry and ModPerl::PerlRun,
respectively, but chdir to the script's directory like mod_cgi
does. These two new handlers will refuse to load under threaded MPMs
where chdir can't be used as it will affect all running threads [Stas]

ModPerl::RegistryCooker::chdir_file_normal() now chdirs to the current
script's directory or the specified directory as an argument, as it
was planned in first place. Therefore switch ModPerl::Registry and
ModPerl::PerlRun to us NOP for this method call. If chdir_file is
mapped to chdir_file_normal(), then run() and
convert_script_to_compiled_handler() now call chdir to the script's
directory and at before returning go back to the server root. [Stas]

prevent undef warnings in catfile() calls in Apache2::Build when
called from the ModPerl-Registry tree [Stas]

fix modperl_brigade_dump to use apr_file_printf() instead of
fprintf(), which doesn't work everywhere [Stas]

Fix a warning triggered by `ln` on Cygwin, when running perl
Makefile.PL for a second time without previously running make
clean. [Nikolay Ananiev <ananiev@thegdb.com>]

When compiling a static mod_perl and
MP_AP_CONFIGURE="--with-apr=/some/path" argument is given, Apache will
use the apr-config at the given path, but mod_perl was using the
default at "srclib/apr/.libs". Fix that [Nikolay Ananiev <ananiev@thegdb.com>]

Show MP_APU_CONFIG as an argument to Makefile.PL in the Usage
menu. [Nikolay Ananiev <ananiev@thegdb.com>]

Makefile.PL: fix the pre-rename mp2 install diagnostics code, to use
the mp version of 1.999xx and not 1.999_xx, as the latter is
unsuitable for numerical comparison, also fix the name of the reported
conflicting directory [Stas].

add APR::Status::is_(EACCES|ENOENT), and use in ModPerl::RegistryCooker
to return, as appropriate, Apache2::Const::(FORBIDDEN|NOT_FOUND),
based on $@. Also remove a check in modperl_slurp_filename
of src/modules/perl/modperl_util.c to enable $@ to be set when
opening or reading a file fails. This fixes a bug on Win32, revealed
in 404.t and redirect.t of the ModPerl-Registry tests, as reported
by Steve Hay and Markus Wichitill [Stas, Randy Kobes]

link Apache2::* and ModPerl::* to mod_perl.a and DynaLoader.a, but
-lmod_perl and -lDynaLoader don't work, and we can't supply the full
paths, because MakeMaker doesn't allow this. I workaround this by
making a symlink to mod_perl.a (called libmod_perl.a) and copy
DynaLoader.a to libDynaLoader.a (I don't create a symlink, because,
when running make clean, the real DynaLoader.a may get deleted).  The
APR::* extensions are not affected, because in both cases we link them
against aprext.  Also other small fixes are added. [Nikolay Ananiev
<ananiev@thegdb.com>]




=item 1.999_23 - May 3, 2005

fix Apache2::Build::dynamic_link_MSWin32 to generate a new line after
dynamic_link code in Makefile [Nikolay Ananiev <ananiev@thegdb.com>]

fix a warning in Apache2::Build::build_config() when building
with MP_STATIC_EXTS=1 [Nikolay Ananiev <ananiev@thegdb.com>]

improving DSO support on cygwin. The problem with cygwin is that it
behaves like windows (it's a posix layer over windows after
all). That's why we need to supply all symbols during linking time
just like on win32, by adding -lapr-0 -laprutil-0 and -lhttpd. On
windows, Apache supplies all the three libraries and it's easy to
link, but on cygwin apache doesn't play nice and doesn't supply
libhttpd. This change adds libapr and libaprutil. [Nikolay Ananiev
<ananiev@thegdb.com>]

improve the diagnostics when detecting mp2 < 1.999022, tell the user
which files and/or dirs need to be removed [Stas]

restore the DESTDIR support partially nuked by the apache2 rename
branch [Torsten Förtsch <torsten.foertsch gmx.net>]

add APR::Status to provide functions corresponding to the
APR_STATUS_IS_* macros of apr_errno.h, especially those composites
like APR_STATUS_IS_EAGAIN(s) which are satisfied by more than one
specific error condition. Presently only APR_STATUS_IS_EAGAIN is
provided [Randy Kobes]

fix the generation of the manpages for .pm files from sub-projects
like ModPerl-Registry (previously was creating manpage files like
.::ModPerl::PerlRun.3) [Stas]

fix the pod2man'ification part of 'make install' (using POD2MAN_EXE
instead of POD2MAN Makefile macro) [Stas]


=item 1.999_22 - April 14, 2005

    ******************** IMPORTANT ********************
    this version of mod_perl is completely incompatible
      with prior versions of mod_perl, both 1.XX and
     1.99_XX. Please read the below changes carefully.
    ***************************************************

remove MP_INST_APACHE2 installation option and Apache2.pm - all
mod_perl related files will now be installed so they are visible
via standard @INC.  also, refuse to install over mod_perl 2 versions
less than 1.999_22.  [Geoffrey Young]

s/Apache::/Apache2::/g and s/mod_perl/mod_perl2/g in all module
APIs.  so, Apache::RequestRec is now Apache2::RequestRec,
Apache::compat is now Apache2::compat, and so on. [joes]

move all Apache:: constants to Apache2::Const and all APR:: constants
to APR::Const.  for example, Apache:OK is now Apache2::Const::OK and
APR::SUCCESS is now APR::Const::SUCCESS.  [Geoffrey Young]

add $ENV{MOD_PERL_API_VERSION} as something that clearly distinguishes
which mod_perl version is being used at request time.  [Geoffrey Young]

rename Apache->request() to Apache2::RequestUtil->request(), and
Apache->server() to Apache2::ServerUtil->server()
[Geoffrey Young]

fix Apache2::Status which was bailing out on trying to load modules
with dev versions like 2.121_02 [Stas]

When parsing Makefile.PL MP_* options, handle correctly the MP_FOO=0
entries [Philip M. Gollucci <pgollucci@p6m7g8.com>]

init the anonsub hash for base perl and each vhost +Parent (previously
was init'ed only for the base perl) [Stas]

fix a bug when a non-threaded perl is used and anonymous sub is pushed
at the server startup (the CV wasn't surviving) [Stas]

Make sure that CPAN shell doesn't triple over usage of
$ExtUtils::MakeMaker::VERSION [Randy Kobes]

Apache2::RequestRec->new now sets $r->request_time [Stas]

remove CGI.pm and Apache::Request dependencies from Apache2::Status
since they weren't used at all [Geoffrey Young]

Fixes for Apache2::Reload's touchfile feature (return Apache2::Const::OK
instead of 1) [Chris Warren <chwarren@cisco.com>]

cygwin fixes: [Nikolay Ananiev <ananiev@thegdb.com>]
- doesn't like XS wrapper starting with 'static'
- need to compile everything with -DCYGWIN

ModPerl::RegistryCooker API change: s/rewrite_shebang/shebang_to_perl/
the new API now returns the string to prepend before the rest of the
script, instead of rewriting the content, which is both faster and
doesn't mislead the perl debugger [Dominique Quatravaux
<dom@idealx.com>]

Starting from ExtUtils::MakeMaker 6.26 went back to pm_to_blib target
from pm_to_blib.ts introduced in 6.22, so needed to fix the glue_pod
target, so install will work correctly [Stas]

Syntax errors in <Perl> sections were not correctly caught and
reported. [Gozer]

when building mp2 EU::MM looks into Apache-Test/MANIFEST and complains
about the missing Apache-Test/META.yml (which is indeed not included
in the modperl package due to the PAUSE problems of dealing with more
than one META.yml. Solution: Exclude Apache-Test/MANIFEST from
mod_perl distribution package. [Stas]

ModPerl::Registry no longer checks for -x bit (we don't executed
scripts anyway), and thus works on acl-based filesystems. Also
replaced the -r check with a proper error handling when the file is
read in. [Damon Buckwalter <buckwad@gmail.com>]

Apache2::RequestUtil::slurp_filename now throws an APR::Error exception
object (before it was just croaking). [Stas]

fix APR::Error's overload of '==' (it was always returning true
before), and add the corresponding '!=' [Stas]

if $r->document_root was modified, restore it at the end of request
[joes]

Apache2::ServerRec method which set the non-integer fields in the
server_rec, now copy the value from the perl scalar, so if it changes
or goes out of scope the C struct is not affected. Using internal perl
variables to preserve the value, since using the server pool to
allocate the memory will mean a memory leak [Stas]

add the escape_url entry in the ModPerl::MethodLookup knowledgebase
[Stas]

Apache2::SubProcess::spawn_proc_prog now can be called in a void
context, in which case all the communication std pipes will be closed
[Stas]

fix a bug in $r->document_root, which previously weren't copying the
new string away [Stas]

introduce a new build option MP_AP_DESTDIR to aid package builders
direct the Apache-specific files to the right place. [Cory Omand
<Cory.Omand@Sun.COM>]

Fix bug in modperl_package_clear_stash() segfaulting when
encountering declared but not yet defined subroutines.
[Steve Hay <steve.hay@uk.radan.com>, Gozer]

win32 needs PERL_SYS_INIT3/PERL_SYS_TERM calls [Steve Hay
<steve.hay@uk.radan.com>]

Fix broken MP_STATIC_EXTS=1 build. [Gozer]

Perl -Duse64bit fix. Pointers can't just be generically
casted from/to IVs. Use PTR2IV/INT2PTR instead. [Gozer]

Perl -Duse64bit fix. apr_size_t pointers can't just be generically
casted from/to UVs. Use PTR2UV/INT2PTR instead. [Gozer]

fix a bug in Apache2::Build::dir: If the right directory isn't found in
the for loop $dir still contains a > value, so the ||= has no
effect. [Nick Wellnhofer <wellnhofer@aevum.de>]



=item 1.999_21 - January 22, 2005

PerlPostConfigRequire was trying to detect missing files early on,
but without searching thru @INC, causing false negatives. Better off
skipping that check and leave it to modperl_require_file() to report
problems with finding the file.  [Patrick LeBoutillier
<patrick.leboutillier@gmail.com>, Gozer]

add a perl bug workaround: with USE_ITHREADS perl leaks pthread_key_t
on every reload of libperl.{a,so} (it's allocated on the very first
perl_alloc() and never freed). This becomes a problem on apache
restart: if the OS limit is 1024, 1024 restarts later things will
start crashing [Gisle Aas <gisle@ActiveState.com>, Stas]

on Irix mod_perl.so needs to see the libperl.so symbols, which
requires the -exports option immediately before -lperl.  [Gordon Lack
<gml4410@ggr.co.uk>]

pool arguments to startup and connection callbacks must be blessed
into APR::Pool and not Apache::Pool class [joes]

Make PerlSetEnv, PerlPassEnv and %ENV in PerlRequre, PerlModule,
PerlConfigRequire and PerlPostConfigRequire affect each other, so a
change in one of these is immediately seen in the others. [Pratik
<pratiknaik gmail.com>, Stas]



=item 1.999_20 - January 5, 2005

the autogenerated modules (and some implemented in xs/ modules) are
now getting the same version number as $mod_perl::VERSION (the
exception are APR modules which get 0.009_000 for now). [Stas]

until we figure out how to tell PAUSE index about versions of the
autogenerated modules, create a fake module which lists all the
autogenerated modules and their versions and include that in the
distro. [Stas]

moving to the triplet version notation, which requires us to bump 1.99
=> 1.999 so 1.999020 (mp2) > 1.29 (mp1). [Stas]
Now we are gong to have:
  $mod_perl::VERSION        : "1.099020"
  int $mod_perl::VERSION    : 1.09902
  $mod_perl::VERSION_TRIPLET: 1.99.20

<Perl> and PerlPostConfigRequires were leaking some memory at
startup. Use parms->temp_pool instead of parms->pool for temporary
memory allocations. [Gozer]

deal with a situation where an object is used to construct another
object, but it's then auto-DESTROYed by perl rendering the object that
used it corrupted. the solution is to make the newly created objects
refer to the underlying object via magic attachment. only objects
using objects that have DESTROY are effected. This concerns some of
the methods accepting the custom APR::Pool object (not native pools
like $r->pool). [Stas]
Adjusted: 
- APR::Brigade: new
- APR::Finfo: stat
- APR::IpSubnet: new
- APR::Table: copy, overlay, make
- APR::ThreadMutex: new
- APR::URI: parse
- Apache::RequestUtil: new
- APR::Pool: new
- APR::BucketAlloc: new

APR::Bucket::alloc_create moved  to APR::BucketAlloc::new
APR::Bucket::alloc_destroy moved to APR::BucketAlloc::destroy [Stas]

prefork handlers optimisation: don't dup the handler struct unless
this is a threaded-mpm [Stas]

speed up the 'perl Makefile.PL' stage [Randy Kobes]:
 - reduce the number of calls to build_config() of
   Apache::Build within ModPerl::BuildMM
 - cache the results of the calls to apxs_cflags, apxs_extra_cflags,
   and apxs_extra_cppflags in Apache::Build
 - in apxs of Apache::Build, return a cached result only when defined

move ModPerl::Util::exit() into mod_perl.so, since it needs to work,
even if ModPerl::Util wasn't loaded [Stas]



=item 1.99_19 - December 23, 2004

$r->hostname is now writable [Gozer]

Static build with a Perl without ithreads and a non-threaded MPM
would segfault on startup. Caused by a bug in perl's perl_shutdown()
code. Fixed in Perl 5.8.2, so it's now a build requirement [Gozer]

replace the added in 1.99_17 code on resetting/restoring PL_tainted,
with explicit reset before and after each each callback. This solves a
complicated tainting issues caused when perl exception object is
thrown. rgs suggested that it should be safe, similar to perl's own
pp_nextstate which says: /* Each statement is presumed innocent */
[Stas]

New configuration directives: [Gozer]
 - PerlConfigRequire
    Just like PerlRequire, but _always_ triggers an immediate
    interpreter startup
 - PerlPostConfigRequire
    A delayed form of PerlRequire, that waits until the post_config
    phase before require'ing files

fix a warning in Apache::Status [John Williams <williams tni.com>]

Ignore Apache-Test/META.yml in distribution tarballs until PAUSE
is capable of handling multiple META.yml files in one distro [Gozer]

modperl_exports.c now wraps all exported functions in a #ifndef
function_name wrapper to help in weeding out functions that only make
sense for certain Perl configurations (perlio, threads) (which also
fixes static build against perlio-disabled perls, like 5.6.x) [Gozer]

for make test, skip configuring fastcgi if it's found in the global
httpd.conf, as it causes crashes in the test suite [Stas]

fix Makefile.PL arguments parser to support more than one MP_foo
option on the same line (including .makepl_args.mod_perl2 file) [Stas]

fix compilation issues in ModPerl::Util::current_perl_id (on some
builds newSVpvf can't be resolved but Perl_newSVpvf works just
fine). [Stas, Markus Wichitill <mawic@gmx.de>]

fix APR::Error::str to return a lexical variable, rather than a
string. This function is called by SvTRUE in modperl_errsv() via
overload and on win32 (and randomly on linux) causes crashes via:
"Attempt to free temp prematurely" warning, where this 'temp' is the
string returned by this function. Making it a lexical variable before
returning it, resolves the problem. [Steve Hay]

fix META.yaml s/private/no_index/ (to hide the bundled Apache-Test
from PAUSE indexer) [Randy Kobes]



=item 1.99_18 - December 12, 2004

Fix x86_64 warnings in modperl_restart_count_*, due to casting between
integers and pointer types [Joe Orton]

open_logs and post_config handlers require the Apache::OK return code
or the server aborts, so we need to log an error in case the handler
didn't fail but returned something different from Apache::OK [Stas]

new function ModPerl::Util::current_perl_id() which returns something
like (.e.g 0x92ac760) (aTHX) under threaded mpm and 0 under
non-threaded perl (0x0). Useful for debugging modperl under threaded
perls.  [Stas]

make sure that modperl's internal post_config callback, which amongst
other things, cloning perl interpreters is running as
modperl_hook_post_config_last APR_HOOK_REALLY_LAST, which ensures that
user's post_config callbacks are run before the cloning. now the code
from config phase's startup.pl can be safely moved to the post_config
phase's equivalent. [Stas]

Further sync with libapr constants changes: [Stas] 
- the constants
  APR::(READ|WRITE|CREATE|APPEND|TRUNCATE|BINARY|EXCL|BUFFERED|DELONCLOSE)
  now have a prefix APR::FOPEN_ and moved group s/filemode/fopen/
- constants from the fileprot group moved to the fprot group and the
  prefix has changed: from APR::FILEPROT_ to APR::FPROT_
- this also fixes the import of APR_EXCL as an error constant

$r->print() and tied print() now return 0E0 (zero but true) when the
call was successful but for zero bytes.  [Geoffrey Young]

a new function Apache::ServerUtil::server_shutdown_cleanup_register to
register cleanups to be run at server shutdown. [Stas]

$bb->cleanup is no more segfaulting (was segfaulting due to a broken
prototype in APR, and consequently invalid XS glue code) [Randy Kobes,
Stas]

make sure that ABSPERLRUN and ABSPERLRUN are defined in
src/modules/perl/Makefile (needed by win32 build) [Stas]

For static builds, mod_perl header files were being installed
into apache's source tree instead of where apache installed it's
own headers [Gozer]

modperl_threads_started() wasn't working under static worker build,
due to MP_threads_started static variable not being reset on
restart. Now resetting it. [Stas]

@INC shrinking efforts: [Stas]
1) when adding $ServerRoot don't add the trailing / (as it ends up
twice when added by A-T w/o trailing /)
2) add $ServerRoot/lib/perl only if it actually exists

For static builds, we now run 'make clean' in httpd's source
tree before running ./configure if the source tree has been
configured before [Gozer]

Apache::SizeLimit ported [Perrin Harkins <perrin elem.com>]

create a new subpool modperl_server_user_pool (from
modperl_server_pool), which is used internally by
Apache::ServerUtil::server_restart_register. This ensures that
user-registered cleanups are run *before* perl's internals cleanups
are run. (previously there was a problem with non-threaded perls which
were segfaulting on user cleanups, since perl was already gone by that
time). [Stas]

Starting from ExtUtils::MakeMaker 6.22 it no longer generates
pm_to_blib target, but pm_to_blib.ts, so needed to fix the glue_pod
target, so install will work correctly [Stas]

Apache::RequestUtil : $r->child_terminate() implemented for
non-threaded MPMs. [Gozer]

new API Apache::ServerUtil::restart_count() which can be used to tell
whether the server is starting/restarting/gracefully
restarting/etc. Based on this feature implement
$Apache::Server::Starting and $Apache::Server::ReStarting in
Apache::compat [Stas]

Apache::Resource ported to mp2 [Stas]

If none of MP_APXS, MP_AP_PREFIX and MP_USE_STATIC were specified when
configuring Makefile.PL, we now prompt for APXS path first and only if
that fails ask for MP_AP_PREFIX. This is a requirement to get 'make
test' find httpd. [Stas]

Dynamically prompt and add MP_INST_APACHE2=1 when installing on
systems with mod_perl 1 preinstalled. [Stas]

fix the logging call in RegistryCooker [Lars Eggert <lars.eggert
netlab.nec.de>]

fix $r->filename in Apache::compat to update the finfo struct (which
is how it worked in mp1) [Stas]

enclose all occurences of eval_* with ENTER;SAVETMPS;
... FREETMPS;LEAVE; previously things just happened to work, due to
external scopes which was not very reliable and some change could
introduce obsure bugs. [Stas]

in case a native apache response filter is configured outside the
<Location> block with PerlSet*Filter directive, make sure that
mod_perl doesn't try to add it as connection filter (previously was
logging an error like: [error] a content filter was added without a
request: includes) [Stas]

replace the slow implementation of anon handlers using B::Deparse,
with per-interpreter cache of compiled CODE refs (sort of emulating
named subroutines for anonymous handlers) [Stas].

avoid segfaults when a bogus $r object is used [Stas]

Remove magicness of PerlLoadModule and implement Apache::Module::add()
for modules that implement their own configuration directives [Gozer]

Apache::Connection::remote_ip is now settable (needed to set the
remote_ip record based on proxy's X-Forwarded-For header) [Stas]

Fix Modperl::Util::unload_package() [Gozer]
  - Mistakenly skipping small entries of size 2 and less
  - Leave entries from other packages alone

$filter->remove now works with native (non-modperl) filters + test
[Torsten Förtsch <torsten.foertsch gmx.net>]



=item 1.99_17 - October 22, 2004

Implement Apache->unescape_url_info in Apache::compat and drop it
from the official API for CGI::Util::unescape() as a suggested
replacement [Gozer]

fix xs_generate to croak on duplicate entries in xs/maps files
[Christian Krause <chkr plauener.de>]

Workaround a possible bug in Perl_load_module() [Gozer]

Fix a problem building with non-GNU make (can't make target dynamic
in xs/APR/aprext) [Gozer]

escape HTML in dumped variables by Apache::Status [Markus Wichitill
<mawic@gmx.de>]

$r->document_root can now be changed when safe to do so [Gozer]

APR::Bucket->new now requires an APR::BucketAlloc as its first argument.
New subs added: APR::Bucket::setaside, APR::Bucket::alloc_create,
APR::Bucket::alloc_destroy, APR::Brigade::bucket_alloc. [joes]

reimplement APR::Pool life-scope handling, (the previous
implementation had problems) [joes]

make sure that Apache::Filter::read, APR::Socket::recv,
Apache::RequestIO::read, APR::Brigade::flatten, and APR::Bucket::read
all return tainted data under -T [Stas]

tag the custom pools created by mod_perl for easier pools debug [Joe
Orton]

fix a bug in non-ithreaded-perl implementation where the cached
compiled CODE refs of httpd.conf-inlined one-liner handlers like:
PerlFixupHandler 'sub { use Apache::Const qw(DECLINED); DECLINED }'
didn't have the reference count right. [Stas]

per-server PerlSetEnv and PerlPassEnv values are properly added
to %ENV when only a per-directory handler is configured.
[Geoffrey Young]

resolve several 'Use of uninitialized value in...' warnings in
Apache::Status [Stas].

make install and static build now correctly installs mod_perl as
well as the statically built apache [Gozer]

if some code changes the current interpreter's tainted state to on,
the return value from the handler callback will be tainted, and we
fail to deal with that. So revert to coercing any return value, but
undef (a special case for exit()). to IV, so that tainted values are
handled correctly as well. [Stas]

make sure that each handler callback starts with a pristine
tainted-ness state, so that previous callback calls won't affect the
consequent ones. Without this change any handler triggering eval or
another function call, that checks TAINT_PROPER, will crash mod_perl
with: "Insecure dependency in eval while running setgid. Callback
called exit." farewell message [Stas]

make sure that 'make distclean' cleans all the autogenerated files
[Stas]

$r->log_reason has been ported and moved out of Apache::compat
[Gozer]

APR::OS::thread_current renamed APR::OS::current_thread_id and
now returns the actual thread_id instead of an object that
needed to be dereferenced to get at the thread_id [Gozer]

change a bunch of the APR:: constants to have a better prefix
(APR::FILETYPE_* and APR::FILEPROT_). libapr will be changed soon too
[Stas]

Generate modperl_exports.c for static builds to prevent the
linker from stripping needed but unused symbols [Gozer]

Add .libs/ as part of the library search path when building
against httpd's source tree [Gozer]

In the static build, run make in httpd's srclib/ early to have
generated files present at mod_perl configure time [Gozer]

When searching for ap(r|u)-config in httpd's source tree, search
into srclib/apr-util as well as srclib/apr [Gozer]

Remove APR::Finfo::pool as it has no use to us [Stas]

get PerlSetVar and PerlAddVar multi-level merges to (finally) work
properly.  [Rici Lake <rici ricilake.net>]

MP_AP_BUILD configure option removed. Now implicit when MP_USE_STATIC
is specified [Gozer]

Apache::Module $mod->version() and $mod->minor_version() renamed
to $mod->ap_api_major_version() and $mod->ap_api_minor_version
for clarity [Gozer]

Apache::Log changes: [Stas]
  - moved to compat: Apache::warn, Apache->warn, Apache::Server->warn,
    Apache::Server::warn
  - re-enabled $r->warn
  - removed support for Apache::ServerRec->warn
    (Apache::ServerRec::warn is still there)

Apache::Directive conftree() changed from class method to
regular subroutine [Gozer]

Apache::Module top_module() and get_config() as class methods
added to Apache::compat for backwards compatibility [Gozer]

Apache::Module top_module() and get_config() changed from class
methods to regular subroutines [Gozer]

Added Apache::CmdParms::add_config() to work around a memory
leak discovered with <Perl> sections in .htaccess files [Gozer]

Added ModPerl::Util::unload_package() to remove a loaded package
as thoroughly as possible by clearing it's stash. [Gozer]

fix Apache->request($r) to be set-able even w/: PerlOptions
-GlobalRequest [Stas]

Add Apache::Reload->unregister_module() to explicitely remove a
module from Apache::Reload's monitoring list [Gozer]

introduce a custom modperl error message for failing filter handlers
(previously 'unknown error' coming from rc=500 was logged) [Stas]

Fix Apache::Log methods/functions to log into the vhost's error_log
file (if there is one). ( $s->log->*, $s->log_error, $s->log_serror,
Apache::ServerRec::warn, etc.). Apache::ServerRec can now export its
warn function to override CORE::warn [Stas]

Fix $s->log->*, $s->log_error and $s->log_serror to again log into the
vhost's error_log file (if there is one). [Stas]

$s->log->warn and other $s->log->foo are now logging to the right
vhost server and not the global one. modperl_sv2server_rec was
broken. [Stas]

Fix a glue_pod make target bug, when .pm file doesn't exist,
e.g. ThreadMutex.pm is not created on unless
$apr_config->{HAS_THREADS} [Stas]

Introduce APR::Socket::poll to poll a non-blocking socket [Ken Simpson
<ksimpson@larch.mailchannels.com>]

Fix the error message when the minimal required httpd version is not
satisfied [Pratik <pratiknaik@gmail.com>]

Fix interactive prompting at perl Makefile.PL, when no APXS or
MP_AP_PREFIX were provided. now asking for an alternative location if
the suggested choices weren't selected. [Stas]

Added APR::URI->rpath method. Returns the path of an uri minus
path_info, if any. [Gozer]

moved Apache::current_callback() to ModPerl::Util::current_callback
where it belongs [Gozer]

modperl_perl_module_loaded() fixed to use %INC to determine if a module
is loaded instead of checking for the existence of a stash [Gozer]

fix the modperl build, where httpd has been built against separate
installations of apr-util and apr, where apr-util has been installed
with a different includedir to apr. [Joe Orton]

$Apache::Server::SaveConfig is now $Apache::PerlSections::Save
[Geoffrey Young]



=item 1.99_16 - Aug 22, 2004

Fix a compilation problem breaking 1.99_15 (sv_copypv was added in
perl 5.7.3) [Jason Woodward <woodwardj@jaos.org>]

Added $r->content_languages in Apache::RequestRec [Gozer]

APR::Bucket: add delete() and destroy() methods [Stas]



=item 1.99_15 - Aug 20, 2004

replace the memory allocation for modperl filter handlers to use a
temporary subpool of the ap_filter_t object. previously using perl's
safemalloc had problems on win32 (randomly my_perl == NULL) [Stas]

Disable Apache::HookRun::run_create_request -- it's already run
internally by Apache::RequestRec->new [Stas]

Update Apache::RequestRec->new() to initialize members of request_rec
which were added some time ago (without it we were getting segfaults
in the new pseudo_http test. [Stas]

Apache::CmdParms->limited member replaced by is_method_limited()
method [Gozer]

Apache::Module changes [Gozer]
- readwrite => readonly:
    cmds, next, name, module_index, minor_version, version
- removed: remove_module

ensure that a sub-dir Apache-Test exists in the source distro (this is
a requirement, since the test suite relies on the particular
Apache-Test version distributed with the mod_perl source) [Stas]

combine handler resolving failure error with the actual error, so
there is only one logged entry [Stas]

pod manpages are now glued to all .pm files for which .pod exists at
'make install' phase [Stas]

Apache::RequestIO::sendfile() now indicates which file it has failed
to open on failure. [Stas]

fix Apache::SubRequest's methods: lookup_file, lookup_uri,
lookup_method_uri to default the last argument to
r->proto_output_filters (no request filters for the subrequest) and
not r->output_filters->next as it was before (one filter was getting
skipped and the rest of the filters were applied *twice*). [Stas]

Apache::CmdParms changes [Gozer]
- readwrite => readonly:
    override, limited, directive, pool, temp_pool, server, path,
    cmd, context, err_directive

- removed: limited_xmethods, xlimited, config_file, err_directive

Fix a bug in APR::Bucket->new when a passed argument was of type
PADTMP [Stas]

Apache::Connection changes [Stas, "Fred Moyer" <fred /about/
taperfriendlymusic.org>]
- readwrite => readonly:

    pool, base_server, local_addr, remote_addr, remote_ip, remote_host, 
    aborted, local_ip, local_host, id, conn_config, sbh, bucket_alloc

- removed: logname

Move check_cmd_context from Apache::Command to Apache::CmdParms.
[Gozer]

Add :context group of constants for check_cmd_context().
NOT_IN_VIRTUALHOST, NOT_IN_LIMIT, NOT_IN_DIRECTORY, NOT_IN_LOCATION,
NOT_IN_FILES, NOT_IN_DIR_LOC_FILE & GLOBAL_ONLY [Gozer]

Removed Apache::Command method soak_end_container [Gozer]

Removed Apache::Module methods (dynamic_load_handle and
find_module_name) [Gozer]

All Apache::Command methods are now read-only [Gozer]

Removed Apache::Command methods (func and cmd_data) [Gozer]

Removed Apache::Directive methods (data & walk_config) [Gozer]

All Apache::Directive methods are now read-only [Gozer]

Filters should not reset $@ if it was already set before
invocation [Gozer]

Apache::compat server_root_relative now correctly handles absolute 
paths like ap_server_root_relative does [Gozer]

Fix a bug in <Perl> sections with multiple aliases in a
virtualhost container. [Gozer]

PerlModule, PerlRequire, Perl and <Perl> is now supported in
.htaccess. They will run for each request. [Gozer]

removed support for httpd 2.0.46.  httpd 2.0.47 is now the minimum
supported version.  [Geoffrey Young]

Static builds for httpd >= 2.0.51 available. With the new MP_AP_BUILD
option, configure and compile an httpd with mod_perl statically linked
in [Gozer]

Apache::RequestRec methods changes [Stas]
- readwrite => readonly:

    connection, canonical_filename, header_only, main, next, prev,
    pool, per_dir_config, request_config, proto_num, protocol,
    request_time, server, the_request, unparsed_uri

- removed:

    remaining - this method is not needed if the deprecated
                $r->client_block methods aren't used, (use $r->read
                $r->instead)
    canonical_filename - it's a private member

The func Apache::SubProcess::spawn_proc_prog is now a method:
$r->spawn_proc_prog [Stas]

Apache::Process methods (pool, pconf and short_name) are now read-only
[Stas]

($r|$c|$s)->server_root_relative were removed. Now only an explicit
and somewhat deprecated function API remains:
Apache::ServerUtil::server_root_relative($pool, $path); it's too easy
to cause memory leak with this method, and it's inefficient as it
duplicates the return value, to avoid potential segfaults if the pool
it was allocated from gets destroyed and the value is attempted to be
used. Instead of this method use the equivalent:
File::Spec->catfile(Apache::ServerUtil::server_root, $fname); [Stas]

$r->psignature now lives in the package it belongs to:
Apache::RequestUtil (previously lived in Apache::ServerUtil). [Stas]

A few functions moved namespace from Apache:: to Apache::ServerUtil::
(to make it easier to find the container of the function): [Stas]
  - exists_config_define
  - server_root
  - get_server_built
  - get_server_version

fix an old outstanding bug in the APR::Table's TIE interface with
each()/values() over tables with multi-values keys. Now the produced
order is correct and consistent with keys(). Though, values() works
correctly only with perl 5.8.x and higher. [Joe Schaefer]

require Perl 5.6.1, 5.6.0 isn't supported for a long time, but we
weren't aborting at the Makefile.PL stage [Stas]

Apache::RequestUtil::method_register($s->process->pconf, 'FOO'); is
now $s->method_register('FOO').
Apache::RequestUtil::add_version_component($s->process->pconf, 'BAR/0.1');
is now $s->add_version_component('BAR/0.1').  [Stas]

Remove $Apache::Server::StrictPerlSections. Now, all <Perl>
sections errors are fatal by default and cause server startup to
abort on error. [Gozer]

Fix ($r|$filter|$bucket)->read() functions to run the set magic logic,
to handle cases when a passed buffer to fill is not a regular
scalar. [Stas]

Apache::ServerRec accessors changes: [Stas]
- readonly accessors:

    process, next, is_virtual, module_config, lookup_defaults and
    addrs

- readwrite accessors with the exception of threaded mpms, where the
  accessors are writable only before the child_init phase (i.e. before
  threads are spawned):

    server_admin, server_hostname, port, error_fname, error_log,
    loglevel, timeout, keep_alive_timeout, keep_alive_max, keep_alive,
    names, wild_names, limit_req_line, limit_req_fieldsize,
    limit_req_fields, and path

supports a new type of struct accessor, which is just like read/write
one, but doesn't allow write access starting at the ChildInit phase
under threaded mpm (to avoid thread-safely issues) [Stas]

In order to be consistent with Apache::RequestRec, Apache::Server is
now Apache::ServerRec and all methods/functions from Apache::Server
now live in Apache::ServerRec. [Stas]

Use a context-specific Perl_load_module() instead of load_module(), to
avoid the problem with 'load_module' symbol resolution on certain
platforms, where for some reason it doesn't get resolved at compile
time to Perl_load_module_nocontext [Stas]

Make it possible to disable mod_perl for the base server, but enable
it for the virtual hosts [Stas]

Removed the deprecated path argument to $r->add_config() [Gozer]

Created a META.yml for CPAN and friends, including Apache-Test as
a private resource to keep CPAN from installing mod_perl when a
user just wants Apache::Test [Gozer]

Moving HTTP specific functions get_status_line, method_register from
Apache:: to Apache::RequestUtil:: to match their container [Stas]

Adjust the list of mod_perl header files installed into the Apache2
include/ directory, made necessary from the renaming and refactoring
arising from the decoupling of APR and APR::* from mod_perl.so.
Also include modperl_apr_perlio.h under xs/APR/PerlIO/ in
the list of such files installed [Stas, Randy Kobes]

$r->read()/READ now throw exceptions [Stas]

$r->rflush now returns nothing (was always returning APR::SUCCESS
before) [Stas]

bug reports generating code: [Stas]
- add (apr|apu)-config linking info
- show the full path to the config file used to get the data for the
  report

The APR and APR::* family of modules can now be used without having
to load mod_perl.so. On *nix, this is done by compiling the needed
functions from the appropriate sources used to build mod_perl.so
into APR.so, and then arranging for APR::* to 'use APR ()'. On Win32,
a static library of needed functions is built, and APR/APR::* 
then link into this library [Stas, Joe Schaefer, Randy Kobes]

APR::RequestIO::sendfile() now flushes any buffered output before
sending the file contents out. If the return status is not checked and
an error happens it'll throw an exception. Fix offset handling. [Stas]

Registry: remove the misleading prefix "$$: $class:" in the logged
error message, since not only registry errors will get logged if $@ is
set [Stas]

change t/REPORT to suggest to post bug reports to the modperl users
list, to be consistent with the documentation [Stas]

amd64 fixes  [Joe Schaefer <joe+gmane@sunstarsys.com>]
  - use IV insteaf of int where a pointer is used
  - mpxs_APR__Bucket_new needs to use apr_size_t/off_set_t types

APR::Socket::recv() now returns the length of the read data [Stas]

APR::Bucket's read() returns "" instead of undef when there is no data
to read. [Stas]

fix a bug in Registry handlers, where the same error was logged twice
and potentially a wrong error code returned [Stas]

Apache::RequestIO: print(), printf(), puts(), write(), rflush() throw
an exception on failure [Stas]

Apache::SubRequest: run() throw an exception on failure [Stas]

Apache::Filter: [Stas]
  - remove unneeded methods: remove_input_filter() and
    remove_output_filter(), fputs()
  - frec() accessor is made read-only
  - fflush(), get_brigade() and pass_brigade() now throw exceptions if
    called in the void context
  - read, print() and puts() throw an exception on failure

Apache::FilterRec: [Stas]
  - remove the next() accessor since it's not used by Apache at the
    moment
  - name() is made read-only

APR::URI: [Stas]
  - removed accessors
    o is_initialized() (internal apr_uri flag)
    o  dns_looked_up() and dns_resolved() (they are not 
       used by apache/apr)
  - all remaining accessors now accept undef value, which unsets the
    field

Extended WrapXS code to support a new type of accessor: char * which
accepts undef to set the C pointer to NULL and as such unset the
member of the struct. [Stas]

Exception error messages now include the error id along with the error
message (as they did in first place). [Stas]

$r->finfo now accepts APR::Finfo object as an optional
argument. [Stas]

APR::Finfo [Stas]
  - change stat() to return finfo
  - make all field accessors readonly

ARP::password_validate is now ARP::Util::password_validate [Stas]

APR::IpSubnet::new() now throws APR::Error exception (not returning
rc) [Stas]

rename package APR::NetLib -> APR::IpSubnet to match the class name
[Stas]

APR::BucketType: [Stas]
  - name is readonly

APR::Brigade [Stas]
  - destroy() now throws APR::Error exception (not returning rc)
  - rename empty => is_empty
  - added the method cleanup()
  - flatten() now returns the number of bytes read (and passed the
    buffer by the argument) and throws APR::Error exception

APR::Bucket: [Stas]
  - read() now returns the length of the read data and throws
    APR::Error exception (not returning rc). The returned scalar is
    now TAINTED.
  - type->name now has a module APR::BucketType
  - type(), length(), start(), data() are now all readonly
  - new() fix a bug in offset handling



=item 1.99_14 - May 21, 2004

APR::SockAddr::port() accessor is now read-only [Stas]

APR::Pool now has destroy() and clear() available [Stas]

now logging the errors happening in pool cleanup callbacks [Stas]

use the new Apache-Test attribute -minclient in the test suites. Now
along with the default maxclients = minclients+1, we no longer should
get 'server reached MaxClients setting' errors. [Stas]

new API for APR::Socket recv() and send() + updated tests [Stas]

add infrastructure for new ModPerl::Const constants and the first
constant ModPerl::EXIT. [Stas]

re-implement ModPerl::Util::exit to use exception objects, so it's
possible to detect exit called in eval context and call it again
outside the eval context. [Stas]

add the perl interface for the new exception handling code (mod_perl,
apache and apr methods will now throw exceptions with $@ being an
object). New class APR::Error was added, to handle the exception
objects with overload methods. Also added confess and croak
equivalents of Carp's methods, since at the moment the Carp's ones
don't work as is. The following perl and C methods have been renamed:
  modperl_apr_strerror  => modperl_error_strerror 
  APR::strerror         => APR::Error::strerr 
[Stas]

set the 'error-notes' table to the error message on
HTTP_INTERNAL_SERVER_ERROR [Stas]

fix the apxs build function to not handle empty lookups as errors
[Randy Kobes, Steve Hay]

fix type casting problems in the io functions [Stas]

add support for libgtop 2.5.0+ (maintenance mode) [Stas]

APR::Socket::timeout_set now croaks on failure [Stas]

significantly speedup the startup of threaded mpm test suite, by
configuring only the minimal number of perl interpreters to start
[Stas]

make APR::Socket::opt_(set|get) working (and change the previous
behavior) [Stas]

make sure that our protocol module tests that interact with the socket
use a blocking read [Joe Orton]

Use a better approach to figure out whether we need to strip perl's
LargeFilesSource flag, by checking whether libapr was compiled with
-D_FILE_OFFSET_BITS=64 or not. Checking for APR_HAS_LARGE_FILES is
useless since it doesn't tell whether 32 vs 64 bits off_t and similar
types are used [Joe Orton]

'SetHandler perl-script' no longer grabs any newly encountered END
blocks, and removes them from PL_endav, but only if they are
explicitly registered via ModPerl::Global::special_list_register(END
=> $package_name) (this is a new function). It's now possible to have
a complete control of when END blocks are run from the user space, not
only in the registry handlers [Stas]

END blocks encountered by child processes and not hijacked by
ModPerl::Global::special_list_register() are now executed at the
server shutdown (previously they weren't executed at all). [Stas]

Added test to ensure <Perl> sections can have things like %Location
tied [Gozer]

Fix the installation on Win32 so that an appropriate Apache2
subdirectory under the Perl tree is used when MP_INST_APACHE2 is
specified [Randy Kobes]

Fix a redefined warning in Apache::Status [Stas]

Fix Apache::Status, to lookup the Apache::Request version without
loading it. Only if a suitable (2.x) version is found -- load and use
it. Previously loading the 1.x version was affecting Apache::compat.
[Stas]

Fix a bug in special blocks handling (like END), which until now was
dropping on the floor all blocks but the last one (mainly affecting
registry handlers). [Stas]

The filter streaming API print() function, now correctly handles a
binary data [Stas]

Fix Registry handlers, not to lose the execution errors, when they
include END blocks [Stas]



=item 1.99_13 - March 8, 2004

respect $ENV{APACHE_TEST_STARTUP_TIMEOUT} settings if any [Stas]

Added tests for issuing subrequests from filters [Geoffrey Young]

Updated to the new Apache License Version 2.0 [Gozer]

Drop the support for making GATEWAY_INTERFACE special. It's not needed
as $ENV{MOD_PERL}, available in both mod_perl generations, should be
used to test whether the code is running under mod_perl. [Stas]

Handle correctly the situation when response HTTP headers are printed
from the handler and the response body starts with \000, which is the
case with some images like .ico. [Stas]

Apache::PerlSections->dump() and store(filename) [Gozer]

expose $c->keepalive related constants and $c->keepalives counter
[Stas]

Perl handlers are now guaranteed to run before core C handlers for
all request phases.  [Geoffrey Young]

Fix the STDIN/OUT overriding process to handle gracefully cases, when
either or both are closed/bogus (the problem was only with useperlio
enabled perl) [Stas]

copy apr_table_compress logic from later httpd versions in case mod_perl
is built against 2.0.46, as mod_perl now requires it internally.  users
should be aware that 2.0.47 may become the oldest supported httpd version 
in the near future.  [Geoffrey Young]

Fix the corruption of the httpd process argv[0], caused by $0
manipulating [Stas]

ModPerl::MethodLookup::lookup_method now handles sub-classed objects
[Stas]

standard %ENV population with CGI variables and contents of the
subprocess_env table (such as SetEnv and PassEnv) has been delayed
until the last possible moment before content-generation runs.
PerlSetEnv and PerlPassEnv are each an exception to this and are
placed in both %ENV and the subprocess_env table immediately,
regardless of the current [+-]SetupEnv setting.
[Geoffrey Young]

fix PerlAddVar configuration merging [Geoffrey Young]

Anonymous subs are now supported in push_handlers, set_handlers,
add_input_filter, etc. A fast cached cv is used with non-ithreaded
perl. A slower deparse/eval approach (via B::Deparse) is used with
ithreads enabled perls. Further optimizations are planned for the
latter case. [Stas]

ht_time w/o the pool is now available only via override/restore compat
API. format_time, has been renamed back to ht_time, and the default
values for fmt, time and gmt are now supported. [Stas]

it's now possible to push new handlers into the same phase that is
running at the moment [Stas].

when $r->handler($new_handler) is called from a response phase, it now
checks that the response handler type is not switched (e.g. from
'modperl' to 'perl-script') from the currently used one [Stas]

Since Apache::SubProcess is now part of the mp2 API, add
$r->cleanup_for_exec as a noop in Apache::compat. That function is no
longer needed in Apache2. [Stas]

When 'perl Makefile.PL PREFIX=/foo/bar' is used and mod_perl 1 is
found, but at different prefix no longer require
MP_INST_APACHE2=1. [Stas]

modperl_mgv_resolve now croaks when a module scheduled for autoloading
fails to load.  AutoLoaded modules shouldn't silently fail. [Stas]

Perl(Input|Output)FilterHandler handlers are now always AutoLoaded, as
if '+' prefix was used. This must be performed to get the access to
filter attributes long before the filter itself is executed. [Stas]

APR/Pool.xs has been reimplemented.  The problem with the previous
implementation is that a dead perl pool object could hijack a newly
created pool, which didn't belong to that object, but which happened
to be allocated at the same memory location. The problem is that
apr_pool_user_data_set/get has no mechanism to check whether the pool
has changed since it was last assigned to (it does but only in the
debug mode). It really needs some signature mechanism which can be
verified that the pool is still the same pool. Since apr_pool doesn't
have this feature, the reference counting has been reimplemented using
a plain sv reference. Several new (mainly hijacking) tests which badly
fail with the previous impelementation have been added. [Stas]

fix calling $r->subprocess_env() in a void context so that it only
populates %ENV if also called with no arguments.  also, make sure it
can be called more than once and still populate %ENV.
[Geoffrey Young]

add APR::Brigade::pool() to allow access to the pool associated with
the brigade  [Geoffrey Young]

make 't/TEST -startup_timeout secs' working (previously user's value
was ignored) [Stas]

ModPerl::Registry and friends now support non-parsed headers scripts,
whose filename =~ /^nph-/, identically to mod_cgi. + test [Stas]

implement APR::Brigade::length() and APR::Brigade::flatten() (the
latter implements a wrapper for apr_brigade_flatten, but also includes
an emulation of apr_brigade_pflatten) as [Geoffrey Young]

($r|$s)->add_config() now die if failed (previously returned the
error) [Stas]

fix context problems in <perl> sections and
PerlModule/PerlLoadModule/PerlRequre under threaded mpms w/
PerlOptions +Parent/+Clone in Vhosts + TestVhost::config test. [Stas]

Implemented Apache::get_server_version and Apache::get_server_built
as constant subroutines [Geoffrey Young]

Moved some functions out of the Apache:: namespace:
  Apache::unescape_url()       is now Apache::URI::unescape_url()
  Apache::log_pid()            is now Apache::Log::log_pid()
  Apache::LOG_MARK()           is now Apache::Log::LOG_MARK()
[Geoffrey Young]

if MP_AP_PREFIX is used apxs and apr-config from the apache build tree
won't work, so it can't co-exist with MP_APXS and MP_APR_CONFIG build
options - ensure that this doesn't happen. [Stas]

server_root_relative() now requires either a valid pool or an $r, $s,
or $c object as a first argument.  also, the returned result is a
copy, protecting against cases where the pool would go out of scope
before the result.  [Geoffrey Young]

Check the success of sysopen in tmpfile() in compat [Geoffrey Young]

make sure DynaLoader is loaded before XSLoader, not only with perl
5.6.1, but always because of the issues with <Perl> sections are
loaded from +Parent vhost [Stas]

added ($r|$s)->is_perl_option_enabled($option_name), to test for
PerlOptions + tests [Stas]

On Solaris add a workaround for xs/APR/APR/Makefile.PL to build
APR.so, correctly linked against apr and apr-util libs, by addding the
missing -R paths corresponding to -L flags. EU::MM was adding them via
LD_RUN_PATH instead of using -R, but since perl's lddflags may have -R
it overrides LD_RUN_PATH. So explicitly add anything that may go into
LD_RUN_PATH via -R. Also make sure that -R coming from Apache will
appear first. [Brad Lanam <bll@gentoo.com>]

'make dist' now generates and picks Apache-Test/META.yml which was
always reported missing, as it was included in Apache-Test/MANIFEST
[Stas]

fix the $r->read function to return undef on failure similar to the
core perl function and make $! available for those who test for read()
failures. [Stas]

Make sure that pnotes are destroyed after PerlCleanup handlers are
finished and not before + test. [Stas]



=item 1.99_12 - December 22, 2003

Restore a proper behavior of all Registry handlers, but PerlRun, not
to reset %INC to forget any .pl files required during the script's
execution. [Stas]

<Perl> are now evaluating code into one distinct namespace per
container, similar to ModPerl::Registry scripts. [Philippe M. Chiasson]

Fix ModPerl::MM::WriteMakefile to use the MODPERL_CCOPTS entry from
Apache::BuildConfig, as it contains some flags added by mod_perl,
which aren't in perl_ccopts and ap_ccopts. [Stas]

Add the implementation of Apache::Connection::local_addr and
Apache::Connection::remote_addr to the Apache::compat overridable
functions. [Stas]

Apache::compat's implementation of APR::URI::unparse,
Apache::RequestRec::finfo and Apache::RequestRec::notes is now
overridable and not enabled by default. [Stas]

Apache::compat no longer enables functions which collide with mp2 API
by default. It provides two new functions: override_mp2_api and
restore_mp2_api to override and restore the original mp2 API. [Stas]

For Win32, add a .bat extension to candidates for the apxs and
apr-config utilities used in Apache::Build, so that the -x file
test can potentially succeed [Randy Kobes]

Plug a memory leak with 'perl-script' not cleaning up the temp vars
created during the override of STDIN/STDOUT to use the :Apache IO
layer [Stas]

libgtop config (needed for enabling MOD_PERL_TRACE=m) is now searched
using the gnome packaging tools if available (pkg-config for gnome-2.x
and gnome-config for gnome-1.x) [Stas]

Prevent a problem where an autovivified package (stash) prevents from
modperl_mgv to load the file with that package (until now it was
checking whether the stash existed already and skipped the loading if
that was the case). Now checking %INC and attempting to load the
module. Reporting the failure only if the module has failed to load
and the stash is not defined (so that it's possible to autovivify
packages without loading them from an external file). [Stas]

MaxClients is now overridable from the t/TEST -maxclients command line
option (it was hardcoded before). [Stas]

Postpone the allocation of the wbucket in filters till the moment it's
needed (if at all). Since non-streaming filters aren't going to use
that buffer, it's a waste to allocate/free it. [Stas]

Extend the autogenerated bug report to include information about
installed modules of special interest (which may aid in understanding
the bug report), such as CGI.pm, Apache::Request, LWP, etc. [Stas]

As the test suite keeps on growing, it takes longer time to
startup. Change the main test suite timeout to 180 secs for threaded
mpms and 120 secs for non-threaded ones. [Stas]

use plain malloc/free to allocate filter structs, since they could be
invoked hundreds of times during a single request, causing huge memory
demands if the memory is allocated from the pool, which gets destroyed
only at the end of a request. [Stas]

Fix a compilation error in APX.xs when MP_HAVE_APR_LIBS is not defined
[Fred Moyer <fred@taperfriendlymusic.org>]

fix a memory leak when $filter->ctx is used [Stas]

fix buglet on Win32 (and potentially other non-Unix platforms)
where not all files were being installed under a relative Apache2
subdirectory when MP_INST_APACHE2 was specified [Randy Kobes].

deprecated APR::SockAddr::port_get()/APR::SockAddr::port_set()
replaced with direct access to the port record via
APR::SockAddr::port(). [Geoffrey Young, Stas]

deprecated APR::URI::default_port_for_scheme() replaced with
APR::URI::port_of_scheme() [Geoffrey Young]

deprecated APR::SockAddr::ip_set() and APR::NO_TIMEOUT removed.
[Geoffrey Young]

Apache::MPM->is_threaded() replaces Apache::MPM_IS_THREADED
[Geoffrey Young]

fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef
[Geoffrey Young]

add Apache::MPM class, along with show() and query() class methods
[Geoffrey Young]

add :mpmq import tag to Apache::Const [Geoffrey Young]

Fix ModPerl::Registry handlers family to modify $0 only for the
duration of the handler, by localizing it [Stas]

Fix :Apache perlio's STDOUT to be reentrant + modules/include_subreq
test [Stas]

fix slurp_filename to always open the file and not try to guess
whether filename has been already opened, as there is no reliable way
to accomplish that [Stas]

Apache->can_stack_handlers is now in Apache::compat (mp2 always can
stack handlers) [Stas]

add access to $r->finfo() and related APR::Finfo methods,
such as $r->finfo->size(), $r->finfo->mtime(), and
$r->finfo->stat() [Geoffrey Young]

add :filetype import tag to APR::Const [Geoffrey Young]

<Perl> sections now properly set $0 to the name of the configuration
file they are in. [Philippe M. Chiasson]

Apache::Status: provide a workaround for Config::myconfig() which
fails under threads with (5.8.0 < perl < 5.8.3) [Elizabeth Mattijsen
<liz@dijkmat.nl>]

Fix Apache::Status::handler to return 'Apache::OK' [Juanma Barranquero
<lektu@terra.es>]

<Perl> sections now properly set filename and line number information,
making error messages report the correct location. [Philippe M. Chiasson]



=item 1.99_11 - November 10, 2003

add a build/win32_fetch_apxs script (called within the top-level
Makefile.PL) to offer to fetch and install a Win32 development
version of apxs and (apr|apu)-config [Randy Kobes]

rewrite $r->read() and perlio read functions to use the same function,
which completely satisfies the read request if possible, on the way
getting rid of get_client_block and its supporting functions which
have problems and will most likely will be removed from the httpd-API
in the future. Directly manipulate bucket brigades instead. [Stas]

Since Apache2.pm pops /foo/Apache2 dirs to the top of @INC, it now
also takes care of keeping lib and blib dirs before the system dirs,
so that previously installed libraries won't get loaded instead of the
currently uninstalled libraries that are under test. [Stas]

When 'make test' fails we now print the info on what to do next [Stas]

At the end of 'make install' we now print the info how to proceed with
mod_perl and what to do in the case of post-install problems 
[Geoffrey Young]

Adjust the source to properly work with 5.8.2's new algorithm of
dynamic re-hashing of hashes on hash collision attack. [Nicholas Clark
<nick@ccl4.org>, Stas]. Add a test that mounts such an attack so we
can verify that we can survive this rehashing. [Scott A Crosby
<scrosby@cs.rice.edu>, Nicholas Clark <nick@ccl4.org>, Tels
<perl_dummy@bloodgate.com>, Mark Jason Dominus <mjd@plover.com>, Stas]

Standardize the Apache::PerlSections package name to it's plural form for
clarity and so that the pod gets glued in it's proper place.
[Philippe M. Chiasson <gozer@cpan.org>]

return value from Perl callbacks are now passed directly to Apache
without additional post-call manipulations (such as assuming HTTP_OK
should really be OK).  [Geoffrey Young]

perl 5.8.1 w/ ithreads has a bug where it reports the wrong parent pid
(as if the process was never forked), provide a local workaround (+ new
test). [Rafael Garcia-Suarez <rgarciasuarez@free.fr>]

overridden STD* streams now can be further overridden and will be
properly restored, which allows functions like $r->internal_redirect
work (+add tests) [Stas]

implement perlio's getarg hook, which now allows duping STD* streams
overloaded by modperl [Stas]

Add PerlMapToStorageHandler [Geoffrey Young]

callbacks are now expected to return a meaningful value 
(OK, SERVER_ERROR, etc) or return via an official API 
(exit, die, etc).  relying on implicit returns from the 
last call evaluated by a subroutine may result in server 
errors.  [Stas, Geoffrey Young]

in the MP_MAINTAINER mode add the -Werror compilation flag when perl
v5.6.2 or higher is used, so that we don't miss compilation
warnings. [Stas]

fix the Makefile.PL option parser to support overriding of certain
build options, in addition to appending to them (.e.g. now MP_LIBNAME
is overridable) [Andrew Wyllie <wyllie@dilex.net>]

make sure that connection filters won't be inserted as request filters
[Stas]

Prevent the 'Use of uninitialized value.' warning when
ModPerl::Util::exit is used. [Stas]

To make the test-suite sandbox-friendly, which break when things try to
run off /tmp, use t/logs as the location of the mod_cgid socket and
TMPDIR env var [Haroon Rafique <haroon.rafique@utoronto.ca>]



=item 1.99_10 - September 29, 2003

added Apache::CRLF, Apache::CR, and Apache::LF to
Apache::Const's :platform group  [Geoffrey Young]

make sure that the custom pools are destroyed only once and only when
all references went out of scope [Stas]

($r|$c)->add_(input|output)_filter(\&handler) now verify that the
filter of the right kind is passed and will refuse to add a request
filter as a connection filter and vice versa. The request filter
handler is not required to have the FilterRequestHandler attribute as
long as it doesn't have any other attributes. The connection filter
handler is required to have the FilterConnectionHandler
attribute. [Stas]

fix tracing with (PerlTrace/MOD_PERL_TRACE) on win32 (the error_log
filehandle was invalid after the open_logs phase) [Stas]

fix a bug where %ENV vars set via subprocess_env persist across
requests.  (e.g. a Cookie incoming header which ends up in
$ENV{HTTP_COOKIE} would persist to the next request which has no
Cookie header at all). Now we unset all the %ENV vars set from
subprocess_env. Improve and extend the tests to cover this bug. [Stas]

it is invalid to return HTTP_INTERNAL_SERVER_ERROR or any other HTTP
response code from modperl_wbucket_pass, therefore set the error code
into r->status and return APR_SUCCESS. Until now response handler
with messed up response headers, were causing no response what so ever
to the client.  LWP was assuming 500, and it was all fine, testing
without LWP has immediately revealed that there was a problem in the
handling of this case. [Stas]

put the end to the 'Not a CODE reference' errors, instead provide an
intelligent error message, hopefully telling which function can't be
found.  at the same time improve the tracing to include the pid/tid of
the server that has encountered this problem, to make it easier to
debug. [Stas]

mod_perl handler must be duped for any mpm which runs within
USE_ITHREAD.  Until now there was a big problem with prefork mpm if
any of its vhosts was using PerlOptions +(Parent|Clone) and happened
to load handlers before the main server. When that was happening the
main server will see that the handler was resolved (since it sees the
handler struct from the vhost that loaded this module, instead of its
own), which in fact it wasn't, causing the failure to run the handler
with the infamous 'Not a CODE reference' error. [Stas]

Make sure that the static mod_perl library is built after the dynamic
(a requirement on win32) [Steve Hay <steve.hay@uk.radan.com>]

Apache::Status now generates HTML 4.01 Strict (and in many cases, also
ISO-HTML) compliant output. Also add a simple CSS to make the reports
look nicer. [Ville Skyttä <ville.skytta@iki.fi>]

APR::Pool::DESTROY implemented and tweaked to only
destroy pools created via APR::Pool->new() [Geoffrey Young]

$r->slurp_filename is now implemented in C. [Stas]

remove support for httpd 2.0.45/apr 0.9.3 and lower.
httpd 2.0.46 is now the minimum supported version.
[Geoffrey Young]

APR::PerlIO now accepts the pool object instead of a request/server
objects, so it can be used anywhere, including outside mod_perl [Stas]

when perl is built with perlio enabled (5.8+) the new PerlIO Apache
layer is used, so now one can push layers onto STDIN, STDOUT handles
e.g. binmode(STDOUT, ':utf8'); [Stas]

add ap_table_compress() to APR::Table [Geoffrey Young]

alter stacked handler interface so that mod_perl follows Apache 
as closely as possible with respect to VOID/RUN_FIRST/RUN_ALL
handler types.  now, for phases where OK ends the Apache
call list (RUN_FIRST handlers, such as the PerlTransHandler), 
mod_perl follows suit and leaves some handlers uncalled.
[Geoffrey Young]

Apache::Build now tries to use the new APR_BINDIR query string to find
the location of apr-config. [Stas]

new package Apache::porting to make it easier to port mp1 code to mp2
[Stas]

new Apache::Build methods: mpm_name(), mpm_is_threaded(). use them in
the top-level Makefile.PL to require 5.8.0/ithreads if mpm requires
threads. [Stas]

add the missing XS methods to ModPerl::MethodLookup, add support for
mp1 methods that are no longer in the mod_perl 2.0 API. [Stas]

mod_perl now refuses to build against threaded mpms (non-prefork)
unless perl 5.8+ w/ithreads is used [Stas]

don't try to read PERL_HASH_SEED env var, where apr_env_get is not
available (apr < 0.9.3) [Stas]

APR.so now can be loaded and used outside mod_perl (all the way back
to httpd 2.0.36) [Stas]

perl 5.8.1 randomizes the hash seed, because we precalculate the hash
values of mgv elements the hash seed has to be the same across all
perl interpreters. So mod_perl now intercepts cases where perl would
have randomize it, do the seed randomization by itself and tell perl
to use that value. [Stas]

fix APR::PerlIO layer to pop itself if open() has failed. [Stas]

move the definition of DEFINE='-DMP_HAVE_APR_LIBS' to the top level
Makefile.PL, since it overrides MY::pasthru target which makes it
impossible to define local DEFINE in subdirs. [Stas]

make APR perl functions work outside mod_perl: several libraries
weren't linked. Also LIBS needs to receive all libs in one
string. [Stas]

Apache::compat: $r->cgi_env, $r->cgi_var are now aliases to
$r->subprocess_env [Stas]

For Win32, generate .pdb files for debugging when built with
MP_DEBUG. These will get installed into the same directory as
the associated dll/so libs. As well, install mod_perl.lib
into MP_AP_PREFIX/lib/ for use by 3rd party modules [Randy Kobes].

Apache2.pm is now autogenerated and will adjust @INC to include
Apache2/ subdirs only if built with MP_INST_APACHE2=1 [Stas]

Change the default value for the argument 'readbytes' for
ap_get_brigade(), from 0 to 8192. other than being useless, 0 always
triggers an assert in httpd internal filters and 8192 is a good
default. [Stas]

Fix DynaLoader breakage when using DL_GLOBAL on OpenBSD
[Philippe M. Chiasson <gozer@cpan.org>]

renamed the private modperl_module_config_get_obj function to 
modperl_module_config_create_obj, since the logic creates 
the object but doesn't dig it out if it already exists.  then,
moved logic from mpxs_Apache__Module_get_config into a new public
C function that reused the old name, modperl_module_config_get_obj.
while Apache::Module->get_config exists as a wrapper to return the
object to Perl space, now C/XS folks can also access the object
directly with the public function.
[Geoffrey Young]

Apache::Reload: add a new config variable:
ReloadConstantRedefineWarnings to optionally shut off the constant sub
redefine warnings [Stas]

implement $parms->info.  directive handlers should now be complete.
[Geoffrey Young]

MP_GTOP now works with modern GCC
[Philippe M. Chiasson <gozer@cpan.org]

add missing dependencies to Apache::PerlSections
[Geoffrey Young]

$r->get_client_block is bogus in httpd-2.0.45 (and ealier), as it
can't handle EOS buckets arriving in the same bucket brigade with
data. so rewrite ModPerl::Test::read_post to use an explicit read
through all bucket brigades till it sees eos and then it stops. The
code is longer but it works correctly. [Stas]

an attempt to resolve the binary compatibility problem in
PerlIOAPR_seek API when APR_HAS_LARGE_FILES=0 [Stas]

perl 5.8.0 forgets to export PerlIOBase_noop_fail, causing problems on
win32 and aix. reimplement this function locally to solve the
problem. APR::PerlIO should now be useful on win32 and aix [Stas]

implement DECLINE_CMD and DIR_MAGIC_TYPE constants
[Geoffrey Young]

allow init filter handlers to call other methods than just $f->ctx [Stas]

Fix Apache::Reload to gracefully handle the case with empty Touchfiles
[Dmitri Tikhonov <dmitri@netilla.com>]

PerlRequire entried should be executed before PerlModule entries in
VirtualHost containers, just like in the base server [Stas]



=item 1.99_09 - April 28, 2003

$filter->seen_eos() now accepts 1/0 to set/unset the flag so streaming
filters can control the sending of EOS. [Stas]

support systems where apr header files are installed separately from
httpd header files ["Andres Salomon" <dilinger@voxel.net>]

implement init filter handlers + tests [Stas]

improving ModPerl::MethodLookup to:
- handle more aliased perl XS functions
- sort the methods map struct so one can use the autogenerated map as is
- add lookup_module, tells which methods are defined by a given module
- add lookup_object, tells which methods can be called on a given object
- provide autoexported wrappers print_method, print_module and
  print_object for easy deployment from the command line
[Stas]

add Perl glue for functions: APR::Socket::timeout_get
APR::Socket::timeout_set [Stas]

similar to SetEnv, upcase the env keys for PassEnv on platforms with
caseless env (e.g. win32) [steve.sparling@ps.ge.com]

Add a backcompat wrapper for $r->notes (mp2 supports only the
APR::Table API) [Stas]

Add a script mp2bug and a target 'make bugreport', so people can use
bugreporting during the build and after modperl is installed. [Stas]

Add a script mp2doc as a replacement for perldoc (due to 2.0 modules
living under Apache2, which won't be looked at by perldoc). [Stas]

Add a constant APR::PerlIO::PERLIO_LAYERS_ARE_ENABLED and use it in
tests [Stas]

Require perl 5.8 or higher when building mod_perl on OSes requiring
ithreads (e.g., win32), since 5.6.x ithreads aren't good. [Stas]

MP_COMPAT_1X=0 now can be passed to Makefile.PL to disable
mp1-back-compat compile-time features + adjust tests. [Stas]

<SERVER_ROOT> and <SERVER_ROOT>/lib/perl are now added to @INC, just
like mod_perl 1.0 with MP_COMPAT_1X=1 (currently enabled by
default). [Stas]

The Perl-5.8.0 crypt() workaround is now used only if 5.8.0 is used,
since 5.8.1-tobe/5.9.0-tobe(blead-perl) won't compile with
it. [Geoffrey Young]

new directives PerlSetInputFilter and PerlSetOutputFilter, which are
the same as SetInputFilter and SetOutputFilter respectively, but allow
to insert non-mod_perl filters before, between or after mod_perl
filters. + tests [Stas]

improved filters debug tracing [Stas]

implement $filter->remove (filter self-removal) + tests [Stas]

remove the second-guessing code that was trying to guess the package
name to load from the handler configuration (by stripping ::string and
trying to load the package). fall back to using explicit PerlModule to
load modules whose handler sub name is not called 'handler' + adjust
tests. [Stas]

set the magic taint flags before modules are required [Stas]

make sure to set base server's mip before any of the
PerlRequire/PerlModule directives are called, since they may add
add_config(), which in turn runs Perl sections or PerlLoadModule,
which may need the scfg->mip to be set. [Stas]

ModPerl::MM is now ready to be used in Makefile.PL of 3rd party
mod_perl modules [Stas and Geoff]

fix a segfault caused by PerlModule in $s->add_config, due to setting
the MP_init_done flag before init was done + add test [Stas]

adjust the generated Makefile's to properly build on aix (tested on
powerpc-ibm-aix5.1.0.0) [Stas]

the build now automatically glues the .pod files to the respective .pm
files, so one can use perldoc on .pm files to read the
documentation. [Stas]

provide a workaround for ExtUtils::MakeMaker::mv_all_methods, so
ModPerl::BuildMM and ModPerl::MM can override EU::MM methods behind
the scenes. [Stas]

adding ModPerl::BuildMM, which is now used for building mod_perl.
ModPerl::MM will be used for 3rd party modules. ModPerl::BuildMM
reuses ModPerl::MM where possible. [Stas]

drop the glue code for apr_generate_random_bytes, since it's not
available on all platforms. [Stas]

Since non-threaded mpms don't use tipools in mips, don't create and
destroy them. [Stas]

re-use the workaround for glibc/Perl-5.8.0 crypt() bug for the
main/vhost base perl interpreters as well. This solves the problem for
the buggy glibc on RH8.0. [Stas]

send_cgi_header now turns the header parsing off and can send any data
attached after the response headers as a response body. [Stas]

move the check that print/printf/puts/write/etc are called in the
response phase into the functions themselves so 1) we can print a more
useful error message 2) this check is not always needed in
modperl_wbucket_write, when called internally, so we save some cycles.
[Stas]

add checks that print/printf/puts/write/etc are called in the response
phase. move the check into the functions themselves so we can print a
more useful error message [Stas]

'make install' now installs mod_perl*h files under httpd's include
tree [Stas]

When PerlOptions +ParseHeaders is an effect, the CGI headers parsing
won't be done if any *mod_perl* handler before and including the
response phase, sets $r->content_type.  (similar behavior to mp1's
send_http_header() [Stas]

Registry: make sure that $r is not in the scope when the script is
compiled [Stas]

$Apache::Server::SaveConfig added. When set to a true value,
will not clear the content of Apache::ReadConfig:: once <Perl >
sections are processed. [Philippe M. Chiasson <gozer@cpan.org]

Apache::compat: support 1.0's Apache->push_handlers,
Apache->set_handlers and Apache->get_handlers [Stas]

revamp the code handling output flushing and flush bucket
sending. Namelly modperl_wbucket_flush and modperl_wbucket_pass now
can be told to send a flush bucket by themselves, attaching it to the
data bb they are already sending. This halfs the number of output
filter invocations when the response handler flushes output via $| or
rflush. adjust tests, which were counting the number of invocations.
[Stas]

move ModPerl::RegistryCooker to use a hash as object (similar to mp1),
to make it easier to subclass. [Nathan Byrd <nathan@byrd.net>]

$r->rflush has to flush internal modperl buffer before calling
ap_rflush, so implement rflush, instead of autogenerating the xs code
for it. [Stas]

fix the input filters handling of DECLINED handlers (consume the data,
on behalf of the handler) + tests [Stas]

fix the code that autogenerates modperl_largefiles.h not to define
macros matching m/^-/ (was a problem on aix-4.3.3) [Stas]

$Apache::Server::StrictPerlSections added. When set to a true
value, will abort server startup if there are syntax errors
in <Perl > sections [Philippe M. Chiasson <gozer@cpan.org]

Use Win32::GetShortPathName for Win32 to handle cases when
the supplied MP_AP_PREFIX contains spaces. [Randy Kobes]

Bump up ThreadsPerChild for mpm_winnt in httpd.conf, which seems 
to help avoid server startup problems when running the tests.
[Randy Kobes]

implement a new helper module ModPerl::MethodLookup to help figure out
which module should be loaded when a certain method is reported to be
missing. [Stas]

fix a bug for apr < 0.9.3, where it segfaults in apr_uri_unparse, if
hostname is set, but not the scheme. In case the hostname is defined
but scheme is not Apache::compat will default to the 'http' scheme,
whereas APR::URI::unparse provides no default [Stas]

move $r->send_http_header implementation to Apache::compat.  This
allows the 1.0 code to run unmodified if $r->send_http_header is
called before the response change. we already handle the check whether
content_type was set, when deciding whether the headers are to be
parsed inside modperl_wbucket_pass(). [Stas]

fixes to Apache::compat. make $r->connection->auth_type interface
with r->ap_auth_type. make both $r->connection->auth_type and
$r->connection->user writable. [Geoffrey Young]

Open up r->ap_auth_type, making it possible to write custom
authen handlers that don't rely on Basic authentication or
it's associated ap_* functions.
[Geoffrey Young]

add Apache::Bundle2 [Stas]

Apache::Reload now supports the PerlPreConnectionHandler invocation
mode, so connection filter and protocol modules can be automatically
reloaded on change. [Stas]

implement Apache::current_callback + $r->current_callback goes into
Apache::compat, since now we have a way too many callbacks unrelated
to $r [Stas]

Add Apache::compat methods: $r->connection->auth_type and
$r->connection->user (requires 'PerlOptions +GlobalRequest') + tests
[Stas]

Several issues resolved with parsing headers, including making work
the handlers calling $r->content_type() and not sending raw headers,
when the headers scanning is turned on. Lots of tests added to
exercise different situations. [Stas]

warn on using -T in ModPerl::Registry scripts when mod_perl is not
running with -T [Stas]

perl 5.7.3+ has a built-in ${^TAINT} to test whether it's running
under -(T|t). Backport ${^TAINT} for mod_perl running under
5.6.0-5.7.3, (what used to be $Apache::__T.  $Apache::__T is available
too, but deprecated. [Stas]

add PerlChildExitHandler implementation [Stas]

add PerlCleanupHandler implementation + test [Stas]

die when Apache->request returns nothing ('PerlOptions -GlobalRequest'
or 'SetHandler modperl') [Stas]

New Apache::Directive methods: as_hash(), lookup() + tests + docs
[Philippe M. Chiasson <gozer@cpan.org>]

Stacked handlers chain execution is now aborted when a handler returns
something other than OK or DECLINED [Stas]

make $filter->read() in input streaming filters, use the same number
of arguments as read() in the output filters. [Stas]

Implement $r->add_input_filter and $r->add_output_filter
          $c->add_input_filter and $c->add_output_filter
and add tests  [Stas]

Skip the handler package::func resolving error, only when the error
message matches "Can't locate .*? in @INC", rather than just "Can't
locate", since there are many other errors that start with that
string. [Stas]

the top level 'make test' now descends into the ModPerl-Registry dir
to run 'make test' there [Stas]

All response functions are now returning status and the callers check
and croak on failure or progate them further. [Stas]

OPEN, CLOSE and FILENO implementation for Apache::RequestRec [Stas]

Another fix for the handling of the return status in
ModPerl::RegistryCooker: reset the status to the original one only if
it was changed by the script, otherwise return the execution status
[Stas]

prevent segfault in $r->print / $filter->print (in output filter) and
related functions when they are called before the response phase
[Stas]

prevent segfault in send_http_header when it's called before the
response phase [Stas]

input stream filtering support was added + tests (plus renaming filter
tests so we can know from the test name what kind of filter is tested)
[Stas]

Add proper support for mis-behaved feeding filters that send more than
one EOS bucket in streaming filters + test. [Stas]

prevent a segfault when push_handlers are used to push a handler into
the currently phase and switching the handler (perl-script/modperl) +
tests [Stas]

Add $filter->seen_eos to the streaming filter api to know when eos has
been seen, so special signatures can be passed and any data stored in
the context flushed + tests. [Stas]

Add $filter->ctx to maintain state between filter invocation + tests
[Stas]

Request input and output filters are now getting the EOS bucket, which
wasn't passed through before. Now the context can be flushed on
EOS. [Stas]



=item 1.99_08 - January 10, 2003

Correct ModPerl::RegistryCooker to reset %INC, after compile for .pl
files which don't declare the package + add tests to check that [Stas]

Log the real error message when Foo::Bar::sub_name fails to resolve,
because of a problem in Foo::Bar, when Foo::Bar *was* found [Stas]

Add PerlPreConnectionHandler support in Apache::Test [Stas]

Enable PerlPreConnectionHandler [Stas]

Support the Host: request header in Apache::TestClient [Stas]

restore the ModPerl::RegistryLoader::new() method for backwards
compatibility  [Stas]

port the support for NameWithVirtualHost in ModPerl::RegistryCooker
and ModPerl::RegistryLoader [Stas]

fix the handling of the return status in ModPerl::RegistryCooker, add
a test to verify that [Stas]

under non-threaded perl need to check whether mod_perl is running,
when modperl_vhost_is_running check is done. [Stas]

fix $r->read to read all the requested amount of data if possible,
adjust the test TestApache::read to verify that [Stas]

fix the method content() in Apache::compat to read a whole request
body. same for ModPerl::Test::read_post. add tests.  [Stas]

Adjust the reverse filter test to work on win32 (remove trailing \r)
[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]

Strongly suggest win32 users to upgrade to 5.8.0, if they run 5.6.x
[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]

When installing the mod_perl shared object, first need to check
whether the directory 'modules' already exists, and create it if not.
[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]

Add a capability to tune the test configuration sections ordering
in Apache::TestConfigPerl [Stas Bekman]

fix the complaining code about late PerlSwitches when PerlLoadModule
is used before it [Stas Bekman]

add various tests that exercise PerlLoadModule and vhosts
[Stas Bekman]

handle correctly PerlLoadModules (directives) with vhosts:
  - handle gracefully cases when things are undef/NULL
  - handle the case when scfg==NULL, by stealing the base_servers's config
[Stas Bekman]

make mod_perl work with vhosts when the server is started prior to
  post_config():
  - call modperl_init_globals as early as possible, because the main server
    record is needed during the configuration parsing, for perlloadmodule
    and vhosts
  - also make sure that we are using a real base_server, when dealing
    with modperl_init, and if not retrieve it from the global record
[Stas Bekman]

prevent segfaults, when scfg is NULL in Apache::Module->get_config();
[Stas Bekman]

ensure that a core file is a file indeed, before complaining [Philippe
M. Chiasson <gozer@cpan.org>]

add $r->as_string [Geoffrey Young]

add backcompat vars: $Apache::Server::CWD and
$Apache::Server::AddPerlVersion [Stas Bekman]

env var MOD_PERL_TRACE is working again [Stas Bekman]

add a new test TestDirective::perlloadmodule2, which performs a more
evolved merging.  [Stas Bekman]

fix Apache::TestConfigPerl under mod_perl 1.0, need to require
mod_perl.pm before using $mod_perl::VERSION [Geoffrey Young]

add an Apache::SIG backcompat stub to Apache::compat [Stas Bekman]

fix the Apache::TestConfigPerl's run_apache_test_config() function
where test packages are scanned for the magic APACHE_TEST_CONFIGURE
and if found get require()'d. Apache2 needs to be run for mod_perl
2.0.  [Stas Bekman]

move the custom mod_perl 2.0 configuration bits out of the
ModPerl::TestRun, where they don't belong, into a special config file
which is included at the very end of httpd.conf [Stas Bekman]

extend Apache::Test to allow extra configuration files to be included
at the very end of httpd.conf, when everything was loaded and
configured [Stas Bekman]

resolve a segfault in Apache::Module::get_config() for the edge case
when the package name is bogus. [Stas Bekman]

Apache::Reload: add support for watching and reloading modules only in
specified sub-dirs [Harry Danilevsky <harry@deerfieldcapital.com>]

enable APR.pm's linking for apr 0.9.2 and higher, which uses a new lib
naming scheme, such as libapr-0.so.0.9.2, only if apr-config and
apu-config scripts exist. [Stas Bekman]

define IoTYPE_RDONLY/IoTYPE_WRONLY for perl-5.6.0 so the project
compiles again under 5.6.0 [Stas Bekman]

allow output streaming filters to append data to the end of the stream
[Stas Bekman]

fixes to compile with ActivePerl 5.8 beta
[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]

fix for directive handlers within vhosts using threaded MPMs
[Stephen Clouse <stephenc@theiqgroup.com>]

fix <IfDefine MODPERL2> support

default AuthType to Basic if not set in $r->get_basic_auth_pw()
[Philippe M. Chiasson <gozer@cpan.org>]

workaround glibc/Perl-5.8.0 crypt() bug (seen with threaded MPMs)

fix delete $ENV{$key} bug

fix parse_args compat method to support non-ascii characters and tr/+/ /
[Walery Studennikov <despair@sama.ru>]

fix post_connection compat method to behave as it did in 1.x
[Geoffrey Young]

add support for setting $r->auth_name and $r->auth_type
[Philippe M. Chiasson <gozer@cpan.org>]

add Apache->httpd_conf compat method
[Philippe M. Chiasson <gozer@cpan.org>]

add default <Perl> handler Apache::PerlSection.
make <Perl> blocks to be EXEC_ON_READ so apache does not parse the contents.
add "Perl" directive for general use and for which <Perl> sections are
stuffed into.
[Philippe M. Chiasson <gozer@cpan.org>]

rename overloaded LoadModule directive to PerlLoadModule and adjust
the test naming



=item 1.99_07 - September 25, 2002

fix =pod directive test config problem
[Philippe M. Chiasson <gozer@cpan.org>]



=item 1.99_06 - September 25, 2002

add support for pod directives (=pod,=back,=cut) and __END__ directive
[Philippe M. Chiasson <gozer@cpan.org>]

tweaks to support Test.pm 1.21 [Philippe M. Chiasson <gozer@cpan.org>]

add $r->add_config method to add dynamic configuration at request time

add Apache::DIR_MAGIC_TYPE constant

add support for directive handlers

fix source_scan to run with current httpd/apr

add Apache::Server->add_config method to add dynamic configuration at
server startup time

add Apache::Directive->to_string method

add support for pluggable <Perl> sections

fix compilation probs with get_remote_host() that had a wrong
prototype [Stas Bekman]

Apache::SubProcess now has a manpage [Stas Bekman]

fix the Apache::SubProcess tests to work with perlio-disabled Perl
[Stas Bekman]

fix the filehandle leak in APR::PerlIO (both perlio-disabled and
perlio-enabled Perl) [Stas Bekman]

remove dup() when converting filehandles from apr_file_t to FILE*
under perlio-disabled Perl (APR::PerlIO) [Stas Bekman]

fix compilation if apache/apr do not have thread support



=item 1.99_05 - August 20, 2002

fix PerlOptions +ParseHeaders to only parse once per-request

add external redirects Registry tests [Stas Bekman]

get rid of the compat layer in ModPerl-Registry [Stas Bekman]

ModPerl::RegistryLoader is now fully operational and tested [Stas Bekman]

Registry method handlers are now working [Stas Bekman]

core Registry packages all compile the scripts into
ModPerl::RegistryROOT:: namespace and cache them in
%ModPerl::RegistryCache. Both overridable by the sub-classes. [Stas Bekman]

compat tests were split into groups by functionality, send_fd test
moved to compat.  [Stas Bekman]

added $c->get_remote_host and a compat wrapper $r->get_remote_host +
tests [Stas Bekman]

adjust the build system to support mod_perl build from the source
tree. [Stas Bekman]

ModPerl::RegistryCooker syncs with mod_perl 1.0's registry:
 - prototypes defined checks in flush_namespace 
                            [Yair Lenga <yair.lenga@citigroup.com>]
 - set error-notes on error [Geoffrey Young]
 - preserve status in Registry scripts [Geoffrey Young]

apr_table_t is now an opaque type, use apr_table_elts() to get the array
record [Stas Bekman]

add support for redirects with PerlOptions +ParseHeaders

backport to 2.0.35

adjust to filter register api change

added APR::ThreadMutex module



=item 1.99_04 - June 21, 2002

various APR PerlIO updates [Stas Bekman]

stop using an apr_pool_t to allocate items for the interpreter pool,
safer for threaded MPMs and prevents "leaks" when interpreters are
removed from due to PerlInterpMax{Requests,Spare}

implement modperl_sys_dlclose() to avoid apr/pool overhead/thread issues

get the -DPERL_CORE optimization working again

PERL_SET_CONTEXT to the parent interpreter when cloning interpreters at
request time, else dTHX might be NULL during clone in the given thread,
which would crash the server.



=item 1.99_03 - June 15, 2002

win32 fix for the global Apache->request object to make sure it uses
the thread local storage mechanism

add a reference count mechanism to interpreters for use in threaded MPMs,
so if APR::Pool cleanups have been registered the interpreter is not
putback into the interpreter pool until all cleanups have run.

unbuffer STDERR (by turning on autoflush by default)

add support for Perl*Handler +Apache::Foo

fix open_logs,post_config,child_init hooks to run in the proper order

adjust to apr_bucket_type_t changes in 2.0.37-dev
[Mladen Turk <mturk@mappingsoft.com>]

add MODPERL2 config define, as if the server had been started with -DMODPERL2

compat additions and fixes: $r->lookup_{file,uri}, $r->is_main, Apache->define

added compat for Apache::log_error [Stas Bekman]



=item 1.99_02 - June 1, 2002

pass the PATH and TZ environment variables at startup by default as 1.xx did

fix ModPerl::Util::exit segv with 5.6.0

no longer support 5.7.x perl development versions

added compat for Apache::Table->new

various fixes to compile/run on darwin

server-scope Perl{Set,Pass}Env config now propagated to %ENV at startup

use SvOK(sv) instead of sv == &PL_sv_undef to detect undef values in xs
[Stephen Clouse <stephenc@theiqgroup.com>]

complete Apache::Util 1.x compat

added Apache::MPM_IS_THREADED constant

added compat function for Apache::Constants::SERVER_VERSION

added Apache::Constants::export stub for compat

added noop stubs for timeout functions removed from 2.0:
$r->{soft,hard,reset,kill}_timeout

turned on PerlOptions +GlobalRequest by default for perl-script handler
unless it is explicitly turned off with PerlOptions -GlobalRequest

added APR::OS::thread_current function

added support for 1.x $r->subprocess_env functionality

added support for $r->push_handlers(PerlHandler => ...)

added support for $r->proxyreq to detect proxy requests

$r->content_type($val) now calls ap_set_content_type underneath

add the err_header_out() wrapper to Apache::compat + corresponding tests
[Stas Bekman]

fix $r->dir_config lookup of values set in the server context

added Apache::REDIRECT shortcut constant

various fixes for method handlers

use Apache::ServerUtil in Apache::compat so Apache->server works in compat
mode [Dave Rolsky <autarch@urth.org>]

add Apache::Util::unescape_uri alias to Apache::unescape_url in Apache::compat

change Apache::unescape_url to return the escaped url as 1.x does

disabled term coloring by default (enable with env var APACHE_TEST_COLOR=1)

fix for APR::IpSubnet->new to check return status apr_ipsubnet_create

enabled APR::SockAddr module

turn on binmode for filehandle used in $r->send_fd

get MP_{TRACE,DEBUG} Makefile.PL options working on win32

various fixes to build/run with bleedperl

various fixes for win32 to get make test passing

moved constuct_{url,server} methods to Apache::URI module

implement Apache::URI::parse in Apache::compat

give Perl*Handlers precedence over other handlers by using APR_HOOK_FIRST
rather than APR_HOOK_LAST

workaround bug in 5.6.1 when XSLoader loads DynaLoader, wiping out any
dl handles it had been keeping track of.

tidy up test to run standalone (without modperl test config) 
[Stas Bekman]

override T_PTROBJ INPUT typemap to croak if object is not a blessed
reference, to prevent possible segv from e.g. Apache::Server->process

apr_lock.h is gone; disable APR::Lock for the moment

enabled the Apache::Process module

fix ModPerl::Util::exit to clear $@ before calling Perl_croak

cut down on some build noise

fix 'PerlOptions +GlobalRequest' when used within subrequests

get rid of some "subroutine redefined" warnings in ModPerl::MM that
show up with newer bleedperls.

a few fixes for Apache::compat [Dave Rolsky <autarch@urth.org>]



=item 1.99_01 - April 6, 2002

First public release of mod_perl-2.0-tobe.

=back

=cut
