You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2003/09/29 19:39:15 UTC

[ANNOUNCE]: mod_perl 1.99_10

The uploaded file

     mod_perl-1.99_10.tar.gz

has entered CPAN as

   file: $CPAN/authors/id/S/ST/STAS/mod_perl-1.99_10.tar.gz
   size: 1063061 bytes
    md5: 55345e460b5976b39da9aeb3b5a3b5db

Changes since v1.99_09:

make sure that the custom pools and 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. Untill 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 dupped for any mpm which runs within
USE_ITHREAD.  Untill 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 <st...@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ä <vi...@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 breakeage when using DL_GLOBAL on OpenBSD
[Philippe M. Chiasson <go...@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 <dm...@netilla.com>]

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

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: How to attach a hashref or other data to the request object?

Posted by Matisse Enzer <ma...@hamparts.com>.
Thank you.

This works just fine.

At 3:03 PM -0700 9/29/03, Daisuke Maki wrote:
>Check out $r->pnotes().
>
>    $r->pnotes( OurHash => { foobar => 1 } );
>
>--d
>
>Matisse Enzer wrote:
>
>>Is there an appropriate way in mod_perl 2 for me to take a hashref 
>>and somehow add it to the Apache request object so that Perl code 
>>later in the request handling process can access it, for example 
>>with:
>>     my $hash = $r->{OurHash};
>>or something like that?
>>
>>Specifcally what i am trying to do is to take a hash created using 
>>Apache::Session (a tied hash) and have a reference to that hash be 
>>available in the Apache request object for the rest of the 
>>request's lifetime.


-- 
------------------------------------------
Matisse Enzer
Hamilton Partners
707-431-4300 ext. 212 (office)
415-225-6703 (mobile)

Re: How to attach a hashref or other data to the request object?

Posted by Daisuke Maki <da...@wafu.ne.jp>.
Check out $r->pnotes().

    $r->pnotes( OurHash => { foobar => 1 } );

--d

Matisse Enzer wrote:

> Is there an appropriate way in mod_perl 2 for me to take a hashref and 
> somehow add it to the Apache request object so that Perl code later in 
> the request handling process can access it, for example with:
>     my $hash = $r->{OurHash};
> or something like that?
> 
> Specifcally what i am trying to do is to take a hash created using 
> Apache::Session (a tied hash) and have a reference to that hash be 
> available in the Apache request object for the rest of the request's 
> lifetime.
> 



Re: How to attach a hashref or other data to the request object?

Posted by Praveen Ray <pr...@crcnet1.com>.
Try the pnotes method:
$r->pnotes(MyHash => $your_session_hash);
then later in other handlers...
my $sess_hash = $r->pnotes('MyHash');

On Mon, 2003-09-29 at 17:53, Matisse Enzer wrote:
> Is there an appropriate way in mod_perl 2 for me to take a hashref 
> and somehow add it to the Apache request object so that Perl code 
> later in the request handling process can access it, for example with:
> 	my $hash = $r->{OurHash};
> or something like that?
> 
> Specifcally what i am trying to do is to take a hash created using 
> Apache::Session (a tied hash) and have a reference to that hash be 
> available in the Apache request object for the rest of the request's 
> lifetime.


How to attach a hashref or other data to the request object?

Posted by Matisse Enzer <ma...@hamparts.com>.
Is there an appropriate way in mod_perl 2 for me to take a hashref 
and somehow add it to the Apache request object so that Perl code 
later in the request handling process can access it, for example with:
	my $hash = $r->{OurHash};
or something like that?

Specifcally what i am trying to do is to take a hash created using 
Apache::Session (a tied hash) and have a reference to that hash be 
available in the Apache request object for the rest of the request's 
lifetime.

-- 
------------------------------------------
Matisse Enzer
Hamilton Partners
707-431-4300 ext. 212 (office)
415-225-6703 (mobile)

Re: [ANNOUNCE]: mod_perl 1.99_10

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

The Doctor wrote:
> On Mon, Sep 29, 2003 at 11:10:29AM -0700, Stas Bekman wrote:
> 
>>Stas Bekman wrote:
>>
>>>The uploaded file
>>>
>>>   mod_perl-1.99_10.tar.gz
>>
>>This release:
>>
>> - is the first release to support the hashing randomization in perl 5.8.1.
>> - requires httpd 2.0.46 or higher
>>
> 
> 
> What about support for httpd-2.1.0-dev?

well, you shouldn't have any trouble compiling or using 1.99_10 with httpd 
2.1.  the only issues really relate to what makes 2.1 different than 2.0, 
and the only things that come to mind there are authentication and the 
mod_include rewrite.

if you are interested in the new authentication hooks, you can see the CPAN 
module and article I wrote on it.

http://www.perl.com/pub/a/2003/07/08/mod_perl.html

http://search.cpan.org/~geoff/Apache-AuthenHook-2.00_01/

while that code doesn't work on threaded mpms, it should be pretty easy to 
see how you can just write your own authen hook instead of using that 
module.  and I've recently decided to redo the module anyway so that I can 
support threads - the interface will be less transparent, but it will work 
in a threaded environment.

as for mod_include, support for #perl sections was entirely missing until a 
few weeks ago, when I release Apache::IncludeHook

http://search.cpan.org/~geoff/Apache-IncludeHook-2.00_01/

though I haven't gotten around to writing it against 2.1 yet.

are there other features you are interested in that you don't have access to 
with 1.99_10?  if there are, I'd be happy to work on integrating them, 
whether in a CPAN module or in core, depending on the circumstances.  if you 
haven't guessed, 2.1 interests me :)

--Geoff


Re: [ANNOUNCE]: mod_perl 1.99_10

Posted by The Doctor <do...@doctor.nl2k.ab.ca>.
On Mon, Sep 29, 2003 at 11:10:29AM -0700, Stas Bekman wrote:
> Stas Bekman wrote:
> >The uploaded file
> >
> >    mod_perl-1.99_10.tar.gz
> 
> This release:
> 
>  - is the first release to support the hashing randomization in perl 5.8.1.
>  - requires httpd 2.0.46 or higher
>

What about support for httpd-2.1.0-dev?
 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 

-- 
Member - Liberal International	On 11 Sept 2001 the WORLD was violated.
This is doctor@nl2k.ab.ca	Ici doctor@nl2k.ab.ca
Society MUST be saved! Extremists must dissolve.  
Ontario on 2 Octo 2003, VOTE LIBERAL!!

Re: [ANNOUNCE]: mod_perl 1.99_10

Posted by The Doctor <do...@doctor.nl2k.ab.ca>.
On Mon, Sep 29, 2003 at 11:10:29AM -0700, Stas Bekman wrote:
> Stas Bekman wrote:
> >The uploaded file
> >
> >    mod_perl-1.99_10.tar.gz
> 
> This release:
> 
>  - is the first release to support the hashing randomization in perl 5.8.1.
>  - requires httpd 2.0.46 or higher
>

What about support for httpd-2.1.0-dev?
 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 

-- 
Member - Liberal International	On 11 Sept 2001 the WORLD was violated.
This is doctor@nl2k.ab.ca	Ici doctor@nl2k.ab.ca
Society MUST be saved! Extremists must dissolve.  
Ontario on 2 Octo 2003, VOTE LIBERAL!!

---------------------------------------------------------------------
To unsubscribe, e-mail: announce-unsubscribe@perl.apache.org
For additional commands, e-mail: announce-help@perl.apache.org


Re: [ANNOUNCE]: mod_perl 1.99_10

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> The uploaded file
> 
>     mod_perl-1.99_10.tar.gz

This release:

  - is the first release to support the hashing randomization in perl 5.8.1.
  - requires httpd 2.0.46 or higher

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [ANNOUNCE]: mod_perl 1.99_10

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> The uploaded file
> 
>     mod_perl-1.99_10.tar.gz

This release:

  - is the first release to support the hashing randomization in perl 5.8.1.
  - requires httpd 2.0.46 or higher

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: announce-unsubscribe@perl.apache.org
For additional commands, e-mail: announce-help@perl.apache.org