cvs commit: modperl Changes
dougm 2002/06/16 12:28:21 Modified:src/modules/perl apache_inc.h .Changes Log: Submitted by: Randy Kobes <[EMAIL PROTECTED]> Reviewed by: dougm fix to compile with 5.8.0 on win32 Revision ChangesPath 1.6 +2 -0 modperl/src/modules/perl/apache_inc.h Index: apache_inc.h === RCS file: /home/cvs/modperl/src/modules/perl/apache_inc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apache_inc.h 12 Jun 2001 20:45:38 - 1.5 +++ apache_inc.h 16 Jun 2002 19:28:20 - 1.6 @@ -96,9 +96,11 @@ #undef crypt #endif +#if PERL_VERSION == 6 #ifdef errno #define apache_errno errno #undef errno +#endif #endif #endif /* endif PERL_IS_56 */ 1.652 +4 -2 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.651 retrieving revision 1.652 diff -u -r1.651 -r1.652 --- Changes 6 Jun 2002 05:17:05 - 1.651 +++ Changes 16 Jun 2002 19:28:21 - 1.652 @@ -10,8 +10,10 @@ =item 1.27_01-dev -Document the possible misuses of the Apache::Constant constants [Per -Einar Ellefsen <[EMAIL PROTECTED]>] +fix to compile with 5.8.0 on win32 [Randy Kobes <[EMAIL PROTECTED]>] + +Document the possible misuses of the Apache::Constant constants +[Per Einar Ellefsen <[EMAIL PROTECTED]>] =item 1.27 - June 1, 2002
cvs commit: modperl/lib mod_perl.pm
dougm 2002/06/01 20:07:13 Modified:.Changes lib mod_perl.pm Log: bump version Revision ChangesPath 1.650 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.649 retrieving revision 1.650 diff -u -r1.649 -r1.650 --- Changes 2 Jun 2002 03:02:51 - 1.649 +++ Changes 2 Jun 2002 03:07:13 - 1.650 @@ -8,6 +8,8 @@ =over 3 +=item 1.27_01-dev + =item 1.27 - June 1, 2002 workaround Cwd bug in 5.8.0-RC1 that breaks apache configuration on solaris 1.55 +1 -1 modperl/lib/mod_perl.pm Index: mod_perl.pm === RCS file: /home/cvs/modperl/lib/mod_perl.pm,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- mod_perl.pm 2 Jun 2002 03:02:51 - 1.54 +++ mod_perl.pm 2 Jun 2002 03:07:13 - 1.55 @@ -4,7 +4,7 @@ use DynaLoader (); BEGIN { -$mod_perl::VERSION = "1.27"; +$mod_perl::VERSION = "1.2701"; } sub boot {
cvs commit: modperl/lib mod_perl.pm
dougm 2002/06/01 20:02:51 Modified:.Changes lib mod_perl.pm Log: bump version to 1.27 Revision ChangesPath 1.649 +1 -1 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.648 retrieving revision 1.649 diff -u -r1.648 -r1.649 --- Changes 2 Jun 2002 02:59:37 - 1.648 +++ Changes 2 Jun 2002 03:02:51 - 1.649 @@ -8,7 +8,7 @@ =over 3 -=item 1.26_01-dev +=item 1.27 - June 1, 2002 workaround Cwd bug in 5.8.0-RC1 that breaks apache configuration on solaris 1.54 +1 -1 modperl/lib/mod_perl.pm Index: mod_perl.pm === RCS file: /home/cvs/modperl/lib/mod_perl.pm,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- mod_perl.pm 12 Jul 2001 02:27:28 - 1.53 +++ mod_perl.pm 2 Jun 2002 03:02:51 - 1.54 @@ -4,7 +4,7 @@ use DynaLoader (); BEGIN { -$mod_perl::VERSION = "1.2601"; +$mod_perl::VERSION = "1.27"; } sub boot {
cvs commit: modperl Changes
dougm 2002/06/01 19:59:37 Modified:.Changes Log: add note about Cwd bug Revision ChangesPath 1.648 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.647 retrieving revision 1.648 diff -u -r1.647 -r1.648 --- Changes 29 May 2002 16:56:04 - 1.647 +++ Changes 2 Jun 2002 02:59:37 - 1.648 @@ -10,6 +10,8 @@ =item 1.26_01-dev +workaround Cwd bug in 5.8.0-RC1 that breaks apache configuration on solaris + fix get_set_PVp() to properly set NULL values when passing in undef thanks to Lyle Brooks for the spot [Stephen Clouse <[EMAIL PROTECTED]>]
cvs commit: modperl Makefile.PL
dougm 2002/06/01 19:34:13 Modified:.Makefile.PL Log: workaround bug in 5.8.0-RC1 where Cwd::cwd creates $ENV{IFS} which makes apache configure fall apart on solaris Revision ChangesPath 1.203 +5 -0 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.202 retrieving revision 1.203 diff -u -r1.202 -r1.203 --- Makefile.PL 23 May 2002 03:38:39 - 1.202 +++ Makefile.PL 2 Jun 2002 02:34:12 - 1.203 @@ -94,7 +94,12 @@ '../apache_x.x/src' : $Apache::MyConfig::Setup{Apache_Src} ; +#workaround bug in 5.8.0-RC1 where Cwd::cwd creates $ENV{IFS} +#which makes apache configure fall apart on solaris +my $ifs_exists = exists $ENV{IFS}; my $PWD = cwd; +delete $ENV{IFS} unless $ifs_exists; + $ENV{APACHE_CWD} = $PWD; $ENV{PERL5LIB} = join ':', "$PWD/lib", $ENV{PERL5LIB};
cvs commit: modperl/apaci load_modules.pl.PL
dougm 02/05/23 10:56:56 Modified:apaciload_modules.pl.PL Log: prevent duplicate LoadModules Revision ChangesPath 1.5 +4 -2 modperl/apaci/load_modules.pl.PL Index: load_modules.pl.PL === RCS file: /home/cvs/modperl/apaci/load_modules.pl.PL,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- load_modules.pl.PL25 Mar 2002 00:16:20 - 1.4 +++ load_modules.pl.PL23 May 2002 17:56:56 - 1.5 @@ -44,11 +44,13 @@ my($perl_mod) = grep /perl/, @sh_mods; unshift @sh_mods, $perl_mod; #must come before mod_include/USE_PERL_SSI - + +my %seen; + local *FH; open FH, ">$LoadModule_conf" or die "can't open $LoadModule_conf $!"; -print FH join "\n", @sh_mods, ""; +print FH join "\n", (grep { !$seen{$_}++ } @sh_mods), ""; close FH; system "cat $LoadModule_conf $orig > $tmp && mv $tmp $orig";
cvs commit: modperl/lib/Apache Status.pm
dougm 02/05/23 09:14:56 Modified:lib/Apache Status.pm Log: disable "Enabled mod_perl Hooks" menu item if modperl >= 1.9901 Revision ChangesPath 1.26 +2 -0 modperl/lib/Apache/Status.pm Index: Status.pm === RCS file: /home/cvs/modperl/lib/Apache/Status.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- Status.pm 23 May 2002 16:00:59 - 1.25 +++ Status.pm 23 May 2002 16:14:56 - 1.26 @@ -1,5 +1,6 @@ package Apache::Status; use strict; +use mod_perl (); $Apache::Status::VERSION = '2.03'; @@ -37,6 +38,7 @@ hooks => "Enabled mod_perl Hooks", ); +delete $status{'hooks'} if $mod_perl::VERSION >= 1.9901; delete $status{'sig'} if $Is_Win32; if($Apache::Server::SaveConfig) {
cvs commit: modperl/lib/Apache Status.pm
dougm 02/05/23 09:00:59 Modified:lib/Apache Status.pm Log: make it possible to configure the registry cache via Apache::Status->registry_cache(\%cache); Revision ChangesPath 1.25 +15 -2 modperl/lib/Apache/Status.pm Index: Status.pm === RCS file: /home/cvs/modperl/lib/Apache/Status.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Status.pm 31 Mar 2000 18:19:48 - 1.24 +++ Status.pm 23 May 2002 16:00:59 - 1.25 @@ -1,7 +1,7 @@ package Apache::Status; use strict; -$Apache::Status::VERSION = '2.02'; +$Apache::Status::VERSION = '2.03'; my %is_installed = (); my $Is_Win32 = ($^O eq "MSWin32"); @@ -180,13 +180,26 @@ \@retval; } +my $RegistryCache; + +sub registry_cache { +my($self, $cache) = @_; + +if ($cache) { +$RegistryCache = $cache; +} + +$RegistryCache || $Apache::Registry; +} + sub status_rgysubs { my($r,$q) = @_; my(@retval); local $_; my $uri = $r->uri; +my $cache = __PACKAGE__->registry_cache; push @retval, "Click on package name to see its symbol table\n"; -foreach (sort keys %{$Apache::Registry}) { +foreach (sort keys %$cache) { push @retval, qq($_\n), "";
cvs commit: modperl/src/modules/perl mod_perl.c mod_perl.h
dougm 02/05/22 21:35:16 Modified:src/modules/perl mod_perl.c mod_perl.h Log: fix fix to compile with ithreads Revision ChangesPath 1.145 +2 -2 modperl/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v retrieving revision 1.144 retrieving revision 1.145 diff -u -r1.144 -r1.145 --- mod_perl.c23 May 2002 04:03:46 - 1.144 +++ mod_perl.c23 May 2002 04:35:16 - 1.145 @@ -578,9 +578,9 @@ perl_require_module("DynaLoader", NULL); } -static void mod_perl_xs_init(void) +static void mod_perl_xs_init(pTHX) { -xs_init(); +xs_init(aTHX); /* XXX: in 5.7.2+ we can call the body of mod_perl_boot here * but in 5.6.1 the Perl runtime is not properly setup yet 1.116 +2 -0 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.115 retrieving revision 1.116 diff -u -r1.115 -r1.116 --- mod_perl.h23 May 2002 04:03:46 - 1.115 +++ mod_perl.h23 May 2002 04:35:16 - 1.116 @@ -168,6 +168,8 @@ #ifndef PERL_IS_5_6 #define pTHX_ #define aTHXo_ +#define aTHX +#define pTHX #define CopFILEGV(cop) cop->cop_filegv #define CopLINE(cop) cop->cop_line #define CopLINE_set(c,l) (CopLINE(c) = (l))
cvs commit: modperl/t/net/perl server_error.pl
dougm 02/05/22 21:21:07 Modified:.Changes STATUS lib/Apache Registry.pm t/net/perl server_error.pl Log: Submitted by: Jesse Erlbaum <[EMAIL PROTECTED]> Reviewed by: dougm Apache::Registry errors are now saved in $r->notes('error-notes') Revision ChangesPath 1.645 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.644 retrieving revision 1.645 diff -u -r1.644 -r1.645 --- Changes 23 May 2002 03:38:39 - 1.644 +++ Changes 23 May 2002 04:21:06 - 1.645 @@ -10,6 +10,9 @@ =item 1.26_01-dev +Apache::Registry errors are now saved in $r->notes('error-notes') +[Jesse Erlbaum <[EMAIL PROTECTED]>] + fix Win32 build problems with spaces in shell arguments [Randy Kobes <[EMAIL PROTECTED]>] 1.20 +1 -10 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- STATUS23 May 2002 03:38:39 - 1.19 +++ STATUS23 May 2002 04:21:06 - 1.20 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/05/23 03:38:39 $] + Last modified at [$Date: 2002/05/23 04:21:06 $] Release: @@ -9,15 +9,6 @@ Available Patches: - -* implement notes('error-notes') in Registry a la mod_cgo -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101862462900504&w=2 - Status: - I haven't had the chance to investigate this thoroughly, but - mod_perl does seem to be setting error-notes for some things. maybe - just not enough things or Registry specific things? --Geoff - patch available at - http://marc.theaimsgroup.com/?l=apache-modperl&m=101862462900504&w=2 * Apache::Status allows standard keys to be overridden Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101559176217056&w=2 1.34 +10 -4 modperl/lib/Apache/Registry.pm Index: Registry.pm === RCS file: /home/cvs/modperl/lib/Apache/Registry.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Registry.pm 28 Sep 2000 16:35:53 - 1.33 +++ Registry.pm 23 May 2002 04:21:07 - 1.34 @@ -24,6 +24,13 @@ $Apache::Registry::MarkLine = 1; } +sub xlog_error { +my($r, $msg) = @_; +$r->log_error($msg); +$r->notes('error-notes', $msg); +$@{$r->uri} = $msg; +} + sub handler { my $r = shift; if(ref $r) { @@ -127,8 +134,7 @@ compile($eval); $r->stash_rgy_endav($script_name); if ($@) { - $r->log_error($@); - $@{$uri} = $@; + xlog_error($r, $@); return SERVER_ERROR unless $Debug && $Debug & 2; return Apache::Debug::dump($r, SERVER_ERROR); } @@ -152,7 +158,7 @@ } if($errsv) { - $r->log_error($errsv); + xlog_error($r, $errsv); return SERVER_ERROR unless $Debug && $Debug & 2; return Apache::Debug::dump($r, SERVER_ERROR); } @@ -165,7 +171,7 @@ #} return $r->status($old_status); } else { -$r->log_error("$filename not found or unable to stat"); +xlog_error($r, "$filename not found or unable to stat"); return NOT_FOUND unless $Debug && $Debug & 2; return Apache::Debug::dump($r, NOT_FOUND); } 1.2 +11 -2 modperl/t/net/perl/server_error.pl Index: server_error.pl === RCS file: /home/cvs/modperl/t/net/perl/server_error.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- server_error.pl 19 Mar 1998 23:09:06 - 1.1 +++ server_error.pl 23 May 2002 04:21:07 - 1.2 @@ -2,9 +2,18 @@ $r->send_http_header("text/plain"); -print "ServerError:\n"; +my $err = $@{$r->prev->uri}; -print $@{$r->prev->uri}; +my $note = $r->prev->notes('error-notes') || 'NONE'; + +print "ServerError: $err\n"; + +if ($note eq $err) { +print "error-notes is also set"; +} +else { +print "error-notes is different: $note"; +} print "\n"; print 'dump of %@:', "\n";
cvs commit: modperl/src/modules/perl mod_perl.c mod_perl.h
dougm 02/05/22 21:03:46 Modified:src/modules/perl mod_perl.c mod_perl.h Log: better fix for DynaLoader vs XSLoader workaround Revision ChangesPath 1.144 +23 -1 modperl/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v retrieving revision 1.143 retrieving revision 1.144 diff -u -r1.143 -r1.144 --- mod_perl.c24 Mar 2002 23:01:33 - 1.143 +++ mod_perl.c23 May 2002 04:03:46 - 1.144 @@ -569,6 +569,28 @@ perl_startup(s, p); } +static void mod_perl_boot(void *data) +{ +/* make sure DynaLoader is loaded before XSLoader + * to workaround bug in 5.6.1 that can trigger a segv + * when using modperl as a dso + */ +perl_require_module("DynaLoader", NULL); +} + +static void mod_perl_xs_init(void) +{ +xs_init(); + +/* XXX: in 5.7.2+ we can call the body of mod_perl_boot here + * but in 5.6.1 the Perl runtime is not properly setup yet + * so we have to pull this stunt to delay + */ +#ifdef SAVEDESTRUCTOR_X +SAVEDESTRUCTOR_X(mod_perl_boot, 0); +#endif +} + void perl_startup (server_rec *s, pool *p) { char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; @@ -677,7 +699,7 @@ MP_TRACE_g(fprintf(stderr, "constructing perl interpreter...ok\n")); perl_construct(perl); -status = perl_parse(perl, xs_init, argc, argv, NULL); +status = perl_parse(perl, mod_perl_xs_init, argc, argv, NULL); if (status != OK) { MP_TRACE_g(fprintf(stderr,"not ok, status=%d\n", status)); perror("parse"); 1.115 +0 -1 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.114 retrieving revision 1.115 diff -u -r1.114 -r1.115 --- mod_perl.h23 May 2002 03:07:27 - 1.114 +++ mod_perl.h23 May 2002 04:03:46 - 1.115 @@ -1192,7 +1192,6 @@ /* perl_config.c */ #define require_Apache(s) \ -perl_require_module("DynaLoader", s); \ perl_require_module("Apache", s) char *mod_perl_auth_name(request_rec *r, char *val);
cvs commit: modperl Changes Makefile.PL STATUS
dougm 02/05/22 20:38:39 Modified:.Changes Makefile.PL STATUS Log: Submitted by: Randy Kobes <[EMAIL PROTECTED]> Reviewed by: dougm fix Win32 build problems with spaces in shell arguments Revision ChangesPath 1.644 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.643 retrieving revision 1.644 diff -u -r1.643 -r1.644 --- Changes 23 May 2002 03:07:27 - 1.643 +++ Changes 23 May 2002 03:38:39 - 1.644 @@ -10,6 +10,9 @@ =item 1.26_01-dev +fix Win32 build problems with spaces in shell arguments +[Randy Kobes <[EMAIL PROTECTED]>] + make sure DynaLoader is loaded before XSLoader to workaround possible segv when using mod_perl as a dso with perl 5.6.1 1.202 +1 -1 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.201 retrieving revision 1.202 diff -u -r1.201 -r1.202 --- Makefile.PL 23 May 2002 02:52:15 - 1.201 +++ Makefile.PL 23 May 2002 03:38:39 - 1.202 @@ -1104,7 +1104,7 @@ cp "lib/mod_perl_hooks.pm.PL", "lib/mod_perl_hooks.pm"; if ($Is_Win32) { - my @args = ($^X, '-spi.bak ', ' -e ', "\"s/sub mod_perl::hooks.*/sub mod_perl::hooks { qw($hooks) }/\"", 'lib/mod_perl_hooks.pm'); + my @args = ($^X, '-spi.bak', '-e', "\"s/sub mod_perl::hooks.*/sub mod_perl::hooks { qw($hooks) }/\"", 'lib/mod_perl_hooks.pm'); system(@args) == 0 or die "@args failed\n"; } iedit "lib/mod_perl_hooks.pm", 1.19 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- STATUS14 May 2002 18:05:34 - 1.18 +++ STATUS23 May 2002 03:38:39 - 1.19 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/05/14 18:05:34 $] + Last modified at [$Date: 2002/05/23 03:38:39 $] Release: @@ -9,12 +9,6 @@ Available Patches: - -* Win32 build problems with spaces in shell arguments -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101681938513575&w=2 - Status: - patch available at - http://marc.theaimsgroup.com/?l=apache-modperl&m=101729204503165&w=2 * implement notes('error-notes') in Registry a la mod_cgo Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101862462900504&w=2
cvs commit: modperl/apaci mod_perl.config.sh
dougm 02/05/22 20:30:21 Modified:apacimod_perl.config.sh Log: another bleedperl/hpux/ld hack Revision ChangesPath 1.26 +1 -1 modperl/apaci/mod_perl.config.sh Index: mod_perl.config.sh === RCS file: /home/cvs/modperl/apaci/mod_perl.config.sh,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- mod_perl.config.sh6 Jul 2001 20:08:36 - 1.25 +++ mod_perl.config.sh23 May 2002 03:30:21 - 1.26 @@ -145,7 +145,7 @@ $ldopts =~ s,(-bE:)(perl\.exp),$1$Config{archlibexp}/CORE/$2, if($^O eq "aix"); #replace -Wl args meant for cc with args for ld -if ($ARGV[0] eq "DSO" and $^O eq "hpux" and $Config{ld} eq "ld") { +if ($ARGV[0] eq "DSO" and $^O eq "hpux" and $Config{ld} =~ /ld$/) { while ($ldopts =~ s/-Wl,(\S+)/$1/) { my $cp = $1; (my $repl = $cp) =~ s/,/ /g;
cvs commit: modperl/t/docs startup.pl
dougm 02/05/22 20:07:28 Modified:.Changes src/modules/perl mod_perl.h t/docs startup.pl Log: make sure DynaLoader is loaded before XSLoader to workaround possible segv when using mod_perl as a dso with perl 5.6.1 Revision ChangesPath 1.643 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.642 retrieving revision 1.643 diff -u -r1.642 -r1.643 --- Changes 23 May 2002 02:52:15 - 1.642 +++ Changes 23 May 2002 03:07:27 - 1.643 @@ -10,6 +10,9 @@ =item 1.26_01-dev +make sure DynaLoader is loaded before XSLoader to workaround possible +segv when using mod_perl as a dso with perl 5.6.1 + autoset PERL_USELARGEFILES=0 if needed fix taint issues with bleedperl 1.114 +1 -0 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- mod_perl.h24 Mar 2002 23:01:33 - 1.113 +++ mod_perl.h23 May 2002 03:07:27 - 1.114 @@ -1192,6 +1192,7 @@ /* perl_config.c */ #define require_Apache(s) \ +perl_require_module("DynaLoader", s); \ perl_require_module("Apache", s) char *mod_perl_auth_name(request_rec *r, char *val); 1.44 +1 -0 modperl/t/docs/startup.pl Index: startup.pl === RCS file: /home/cvs/modperl/t/docs/startup.pl,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- startup.pl15 May 2002 18:01:21 - 1.43 +++ startup.pl23 May 2002 03:07:27 - 1.44 @@ -25,6 +25,7 @@ }; $@='' if $@; } +use Socket (); #test DynaLoader vs. XSLoader workaroud use Apache (); use Apache::Registry (); unless ($INC{'Apache.pm'} =~ /blib/) {
cvs commit: modperl Changes Makefile.PL
dougm 02/05/22 19:52:15 Modified:.Changes Makefile.PL Log: autoset PERL_USELARGEFILES=0 if needed Revision ChangesPath 1.642 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.641 retrieving revision 1.642 diff -u -r1.641 -r1.642 --- Changes 16 Apr 2002 02:43:55 - 1.641 +++ Changes 23 May 2002 02:52:15 - 1.642 @@ -10,6 +10,8 @@ =item 1.26_01-dev +autoset PERL_USELARGEFILES=0 if needed + fix taint issues with bleedperl fix bug in modules/util test 1.201 +10 -7 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.200 retrieving revision 1.201 diff -u -r1.200 -r1.201 --- Makefile.PL 23 May 2002 02:44:40 - 1.200 +++ Makefile.PL 23 May 2002 02:52:15 - 1.201 @@ -382,13 +382,6 @@ $PERL_EXTRA_CFLAGS .= " -DPERL_SAFE_STARTUP=1"; } -if ($PERL_USELARGEFILES and $] >= 5.006) { -$PERL_EXTRA_CFLAGS .= " $Config{ccflags}"; -} - -# apache-1.3.xx won't compile with -D_GNU_SOURCE -$PERL_EXTRA_CFLAGS =~ s/-D_GNU_SOURCE//; - for (keys %PassEnv) { $ENV{$_} = $$_ if $$_; } @@ -430,6 +423,13 @@ system_sanity_check(); +if ($PERL_USELARGEFILES and $] >= 5.006) { +$PERL_EXTRA_CFLAGS .= " $Config{ccflags}"; +} + +# apache-1.3.xx won't compile with -D_GNU_SOURCE +$PERL_EXTRA_CFLAGS =~ s/-D_GNU_SOURCE//; + if ($USE_APACI) { print "Will configure via APACI"; if($USE_DSO) { @@ -2459,6 +2459,9 @@ local $Apache::src::APXS = $WITH_APXS; my $cflags = Apache::src->new->apxs('-q' => 'CFLAGS') || ''; return if $cflags =~ /LARGEFILE/; + +$PERL_USELARGEFILES=0; #just do it since +return; #nobody seems to listen to the warning below phat_warn(<
cvs commit: modperl/lib/Apache ExtUtils.pm
dougm 02/05/22 19:44:40 Modified:.Makefile.PL lib/Apache ExtUtils.pm Log: on hpux with bleedperl $Config{ld} is the fullpath, strip to the basename Revision ChangesPath 1.200 +4 -2 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.199 retrieving revision 1.200 diff -u -r1.199 -r1.200 --- Makefile.PL 24 Mar 2002 19:06:03 - 1.199 +++ Makefile.PL 23 May 2002 02:44:40 - 1.200 @@ -19,7 +19,7 @@ use FileHandle (); use DirHandle (); use File::Compare (); -use File::Basename qw(dirname); +use File::Basename qw(dirname basename); use File::Path qw(mkpath rmtree); use Cwd; use File::Copy qw(cp); @@ -2398,7 +2398,9 @@ } } -if ($^O eq 'hpux' and ($USE_DSO or $USE_APXS) and $Config{ld} eq 'ld') { +my $ld = basename $Config{ld}; + +if ($^O eq 'hpux' and ($USE_DSO or $USE_APXS) and $ld eq 'ld') { unless ($ccflags =~ /\+z/i) { my $switch = $] >= 5.006 ? 'A' : 'D'; phat_warn(< sub { s/(.*)/basename $1/e }, ccdlflags => sub { s/-R\s+/-R/; }, ccflags => sub { s/-D_GNU_SOURCE//;
cvs commit: modperl/t/docs startup.pl
dougm 02/05/15 11:01:21 Modified:t/docs startup.pl Log: the easy fix for bleedperl taint issue: don't use ExtUtils::testlib we don't need it anyhow. Revision ChangesPath 1.43 +0 -3 modperl/t/docs/startup.pl Index: startup.pl === RCS file: /home/cvs/modperl/t/docs/startup.pl,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- startup.pl6 Jul 2001 20:33:41 - 1.42 +++ startup.pl15 May 2002 18:01:21 - 1.43 @@ -5,9 +5,6 @@ } BEGIN { -#./blib/lib:./blib/arch -use ExtUtils::testlib; - use lib map { "$Apache::Server::CWD/$_" } qw(t/docs blib/lib blib/arch); require "blib.pl" if -e "./t/docs/blib.pl"; #Perl ignores w/ -T
cvs commit: modperl/src/modules/perl perl_util.c
dougm 02/05/14 19:08:16 Modified:src/modules/perl perl_util.c Log: reverting "fix taint issue with bleedperl" change as it was not the right fix Revision ChangesPath 1.49 +0 -1 modperl/src/modules/perl/perl_util.c Index: perl_util.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- perl_util.c 16 Apr 2002 02:32:22 - 1.48 +++ perl_util.c 15 May 2002 02:08:16 - 1.49 @@ -503,7 +503,6 @@ SvREFCNT_dec(HeVAL(entry)); HeVAL(entry) = &sv_undef; MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry))); - TAINT_NOT; perl_require_pv(HeKEY(entry)); } SvREFCNT_dec(keysv);
cvs commit: modperl Changes
dougm 02/04/15 19:43:55 Modified:.Changes Log: note taint fixes Revision ChangesPath 1.641 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.640 retrieving revision 1.641 diff -u -r1.640 -r1.641 --- Changes 26 Mar 2002 14:52:28 - 1.640 +++ Changes 16 Apr 2002 02:43:55 - 1.641 @@ -10,6 +10,8 @@ =item 1.26_01-dev +fix taint issues with bleedperl + fix bug in modules/util test [Tatsuhiko Miyagawa <[EMAIL PROTECTED]>]
cvs commit: modperl/File File.pm
dougm 02/04/15 19:39:31 Modified:File File.pm Log: fix taint issue with bleedperl Revision ChangesPath 1.7 +1 -1 modperl/File/File.pm Index: File.pm === RCS file: /home/cvs/modperl/File/File.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- File.pm 2 Mar 2000 01:57:46 - 1.6 +++ File.pm 16 Apr 2002 02:39:31 - 1.7 @@ -12,7 +12,6 @@ my $TMPNAM = 'aa'; my $TMPDIR = $ENV{'TMPDIR'} || $ENV{'TEMP'} || '/tmp'; -($TMPDIR) = $TMPDIR =~ /^([^<>|;*]+)$/; #untaint my $Mode = Fcntl::O_RDWR()|Fcntl::O_EXCL()|Fcntl::O_CREAT(); my $Perms = 0600; @@ -22,6 +21,7 @@ my $r = Apache->request; while($limit--) { my $tmpfile = "$TMPDIR/${$}" . $TMPNAM++; +($tmpfile) = $tmpfile =~ /^([^<>|;*]+)$/; #untaint my $fh = $class->new; sysopen($fh, $tmpfile, $Mode, $Perms); $r->register_cleanup(sub { unlink $tmpfile }) if $r;
cvs commit: modperl/src/modules/perl perl_util.c
dougm 02/04/15 19:32:22 Modified:src/modules/perl perl_util.c Log: fix taint issue with bleedperl Revision ChangesPath 1.48 +1 -0 modperl/src/modules/perl/perl_util.c Index: perl_util.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- perl_util.c 24 Mar 2002 23:01:33 - 1.47 +++ perl_util.c 16 Apr 2002 02:32:22 - 1.48 @@ -503,6 +503,7 @@ SvREFCNT_dec(HeVAL(entry)); HeVAL(entry) = &sv_undef; MP_TRACE_g(fprintf(stderr, "reloading %s\n", HeKEY(entry))); + TAINT_NOT; perl_require_pv(HeKEY(entry)); } SvREFCNT_dec(keysv);
cvs commit: modperl/Util Util.pm
dougm 02/03/26 06:56:15 Modified:Util Util.pm Log: Submitted by: Eric Cholet, Robin Berjon Reviewed by: dougm doc: Apache::Util::escape_html is only meant to escape US-ASCII text Revision ChangesPath 1.9 +4 -0 modperl/Util/Util.pm Index: Util.pm === RCS file: /home/cvs/modperl/Util/Util.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Util.pm 4 Mar 2000 20:55:47 - 1.8 +++ Util.pm 26 Mar 2002 14:56:15 - 1.9 @@ -68,6 +68,10 @@ my $esc = Apache::Util::escape_html($html); +This function will correctly escape US-ASCII output. If you are using +a different character set such as UTF8, or need more control on +the escaping process, use HTML::Entities. + =item escape_uri This function replaces all unsafe characters in the $string with their
cvs commit: modperl/t/net/perl util.pl
dougm 02/03/26 06:52:28 Modified:.Changes t/net/perl util.pl Log: Submitted by: Tatsuhiko Miyagawa Reviewed by: dougm fix bug in modules/util test Revision ChangesPath 1.640 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.639 retrieving revision 1.640 diff -u -r1.639 -r1.640 --- Changes 25 Mar 2002 18:45:23 - 1.639 +++ Changes 26 Mar 2002 14:52:28 - 1.640 @@ -10,6 +10,9 @@ =item 1.26_01-dev +fix bug in modules/util test +[Tatsuhiko Miyagawa <[EMAIL PROTECTED]>] + Adjust the mailling list addresses 's|\@apache\.org|\@perl.apache.org|' [Stas Bekman <[EMAIL PROTECTED]>] 1.14 +1 -1 modperl/t/net/perl/util.pl Index: util.pl === RCS file: /home/cvs/modperl/t/net/perl/util.pl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- util.pl 25 Mar 2002 18:45:23 - 1.13 +++ util.pl 26 Mar 2002 14:52:28 - 1.14 @@ -152,7 +152,7 @@ Perl: 21 secs (20.57 usr 0.14 sys = 20.71 cpu) =cut -my $date_str = "Sat, 18 Jul 1998 08:38:00 -0700"; +my $date_str = "Sat, 18 Jul 1998 08:38:00 GMT"; test ++$i, Apache::Util::parsedate($date_str);
cvs commit: modperl/t/net/perl util.pl
dougm 02/03/25 10:45:23 Modified:.Changes src/modules/perl Util.xs t/net/perl util.pl Log: backing out change: properly escape highbit chars in Apache::Utils::escape_html Revision ChangesPath 1.639 +0 -4 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.638 retrieving revision 1.639 diff -u -r1.638 -r1.639 --- Changes 25 Mar 2002 02:57:59 - 1.638 +++ Changes 25 Mar 2002 18:45:23 - 1.639 @@ -26,10 +26,6 @@ properly deal with $r->status codes (e.g. redirect) in Apache::RegistryNG [Geoff Young <[EMAIL PROTECTED]>] -properly escape highbit chars in Apache::Utils::escape_html -[Geoff Young <[EMAIL PROTECTED]>, -Robin Berjon <[EMAIL PROTECTED]>] - allow $r->auth_name and $r->auth_type to be set on win32 [John Kelly <[EMAIL PROTECTED]>] 1.11 +1 -8 modperl/src/modules/perl/Util.xs Index: Util.xs === RCS file: /home/cvs/modperl/src/modules/perl/Util.xs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Util.xs 24 Mar 2002 21:57:53 - 1.10 +++ Util.xs 25 Mar 2002 18:45:23 - 1.11 @@ -32,9 +32,6 @@ return sv; } -#define IS_HIGHBIT_CHAR(b) \ - ( (((unsigned char)(b)) > 126) && (((unsigned char)(b)) <= 255) ) - static SV *my_escape_html(char *s) { int i, j; @@ -46,7 +43,7 @@ j += 3; else if (s[i] == '&') j += 4; -else if (s[i] == '"' || IS_HIGHBIT_CHAR(s[i])) +else if (s[i] == '"') j += 5; if (j == 0) @@ -70,10 +67,6 @@ memcpy(&SvPVX(x)[j], """, 6); j += 5; } -else if (IS_HIGHBIT_CHAR(s[i])) { -sprintf(&SvPVX(x)[j], "&#%d;", (unsigned char)s[i]); -j += 5; -} else SvPVX(x)[j] = s[i]; 1.13 +1 -5 modperl/t/net/perl/util.pl Index: util.pl === RCS file: /home/cvs/modperl/t/net/perl/util.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- util.pl 24 Mar 2002 21:57:53 - 1.12 +++ util.pl 25 Mar 2002 18:45:23 - 1.13 @@ -2,7 +2,7 @@ use Apache::test; $|++; my $i = 0; -my $tests = 8; +my $tests = 7; my $r = shift; $r->send_http_header('text/plain'); @@ -61,10 +61,6 @@ EOF - -#XXX: this test could be more robust, but its better than nothing -my $c = Apache::Util::escape_html("\x8b"); -test ++$i, $c =~ /^&\#\d{3,3}\;$/; my $txt = "No html tags in here at all"; my $etxt = Apache::Util::escape_html($txt);
cvs commit: modperl Changes
dougm 02/03/24 17:59:02 Modified:lib/Apache PerlRun.pm .Changes Log: Apache::PerlRun will now localize $SIG{__{DIE,WARN}__} Revision ChangesPath 1.38 +5 -0 modperl/lib/Apache/PerlRun.pm Index: PerlRun.pm === RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- PerlRun.pm11 Jul 2001 15:11:57 - 1.37 +++ PerlRun.pm25 Mar 2002 01:59:02 - 1.38 @@ -280,6 +280,11 @@ $pr->set_script_name; $pr->chdir_file; my $line = $pr->mark_line; + +#make sure this hooks are restored to their original state +local $SIG{__DIE__} = $SIG{__DIE__}; +local $SIG{__WARN__} = $SIG{__WARN__}; + my %orig_inc = %INC; my $eval = join '', 'package ', 1.637 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.636 retrieving revision 1.637 diff -u -r1.636 -r1.637 --- Changes 24 Mar 2002 23:01:33 - 1.636 +++ Changes 25 Mar 2002 01:59:02 - 1.637 @@ -10,6 +10,9 @@ =item 1.26_01-dev +Apache::PerlRun will now localize $SIG{__{DIE,WARN}__} +thanks to Jon Coulter for the spot + PERL5LIB support now properly unshifts paths into @INC rather than push [Tatsuhiko Miyagawa <[EMAIL PROTECTED]>]
cvs commit: modperl/apaci load_modules.pl.PL
dougm 02/03/24 16:16:20 Modified:apaciload_modules.pl.PL Log: 5.7.3+ File::Find croaks if the finddepth directory does not exist, which it doesn't when building with USE_APXS=1 Revision ChangesPath 1.4 +1 -1 modperl/apaci/load_modules.pl.PL Index: load_modules.pl.PL === RCS file: /home/cvs/modperl/apaci/load_modules.pl.PL,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- load_modules.pl.PL7 Apr 1999 19:10:16 - 1.3 +++ load_modules.pl.PL25 Mar 2002 00:16:20 - 1.4 @@ -40,7 +40,7 @@ } return if $name =~ /(auth|autoindex|digest)/; #a few that screw make test push @sh_mods, "LoadModule ${name}_module $full"; -}, $APACHE_SRC); +}, $APACHE_SRC) if $APACHE_SRC and -d $APACHE_SRC; my($perl_mod) = grep /perl/, @sh_mods; unshift @sh_mods, $perl_mod; #must come before mod_include/USE_PERL_SSI
cvs commit: modperl STATUS
dougm 02/03/24 15:54:32 Modified:.STATUS Log: various updates Revision ChangesPath 1.13 +127 -98 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- STATUS24 Mar 2002 23:01:33 - 1.12 +++ STATUS24 Mar 2002 23:54:32 - 1.13 @@ -1,59 +1,28 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 23:01:33 $] + Last modified at [$Date: 2002/03/24 23:54:32 $] Release: - 1.26-dev: In development. - 1.25: Released July 11, 2001. + 1.27-dev: In development. + 1.26: Released July 11, 2001. Available Patches: -* $r->args parsing of one=&two=2 -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98018719907031&w=2 - Status: - patch available at - http://marc.theaimsgroup.com/?l=apache-modperl&m=98048943129379&w=2 +Needs Patch or Further Investigation * two identical directives in configuration Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97449481013350&w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 - -* $r->finfo problem with HTML::Mason::ApacheHandler -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=96854561311519&w=2 - Status: - may be fixed with - http://marc.theaimsgroup.com/?l=apache-modperl&m=96869790426565&w=2 - -* get/set handlers issues -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=95721313917562&w=2 - Status: - patch available - http://perl.apache.org/~dougm/set_handlers.pat - -* Apache::test -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98278446807561&w=2 - Status: - patch available - -Needs Patch or Further Investigation + however: this documented feature should be supported. * readdir() broken on linux with glibc 2.2 Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98824089613574&w=2 Status: +does anybody have an example to reproduce the bug? -* SERVER_MERGE and DIR_MERGE -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97351976714878&w=2 - Status: - The require() part may be legitimate. personally, I never - understood the DIR_CREATE happening before SERVER_CREATE - either, but it doesn't seem to affect anything. the double - DIR_MERGE is just a misunderstanding on Andy's part and is - a result of how Apache handles before and - after translation. --Geoff - * warn() going to the wrong log Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98190005604037&w=2 Status: @@ -61,6 +30,15 @@ in a vhost when the vhost relies on the ErrorLog from the main server --Geoff + s->error_fname == NULL is expected, see ap_open_logs(), only + s->error_log is inherited. + + i would expect stderr to only ever be opened to the main + server log at startup. otherwise, we'd need to redirect stderr at the + start of every request and restore it at the end. seems expensive. + i would be suprised if this every worked as matt expected it + to. -dougm + * segfaults with DBI->connect (mysql) Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=96392180616185&w=2 Status: @@ -69,10 +47,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=99063926111686&w=2 Status: -* Apache->server->register_cleanup -Report: ? - Status: - * Apache->request(bless {r => $r}, 'My::Apache') Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98600785703290&w=2 Status: @@ -81,10 +55,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=94792974200198&w=2 Status: -* recursion triggered by internal_redirect() called by a pushed handler -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=94792974200198&w=2 - Status: - * IPC::Open3 issues Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98839218229712&w=2 Status: @@ -93,43 +63,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97934624332223&w=2 Status: -* Apache::Status problems?..CGI:
cvs commit: modperl/src/modules/perl mod_perl.c mod_perl.h perl_util.c
dougm 02/03/24 15:01:33 Modified:.Changes STATUS src/modules/perl mod_perl.c mod_perl.h perl_util.c Log: Submitted by: Tatsuhiko Miyagawa <[EMAIL PROTECTED]> Reviewed by: dougm PERL5LIB support now properly unshifts paths into @INC rather than push Revision ChangesPath 1.636 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.635 retrieving revision 1.636 diff -u -r1.635 -r1.636 --- Changes 24 Mar 2002 22:51:04 - 1.635 +++ Changes 24 Mar 2002 23:01:33 - 1.636 @@ -10,6 +10,9 @@ =item 1.26_01-dev +PERL5LIB support now properly unshifts paths into @INC rather than push +[Tatsuhiko Miyagawa <[EMAIL PROTECTED]>] + do not clear symbol tables within a package in perl_clear_symtab() used by directive handler extensions [Stephen Clouse <[EMAIL PROTECTED]>] 1.12 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- STATUS24 Mar 2002 22:51:04 - 1.11 +++ STATUS24 Mar 2002 23:01:33 - 1.12 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 22:51:04 $] + Last modified at [$Date: 2002/03/24 23:01:33 $] Release: @@ -37,12 +37,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98278446807561&w=2 Status: patch available - -* PERL5LIB should unshift @INC instead of push -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=100434522809036&w=2 -Status: - patch available - Needs Patch or Further Investigation 1.143 +2 -2 modperl/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v retrieving revision 1.142 retrieving revision 1.143 diff -u -r1.142 -r1.143 --- mod_perl.c24 Mar 2002 18:22:56 - 1.142 +++ mod_perl.c24 Mar 2002 23:01:33 - 1.143 @@ -747,7 +747,7 @@ #endif #ifdef APACHE_PERL5LIB -perl_incpush(APACHE_PERL5LIB); +perl_inc_unshift(APACHE_PERL5LIB); #else av_push(GvAV(incgv), newSVpv(server_root_relative(p,""),0)); av_push(GvAV(incgv), newSVpv(server_root_relative(p,"lib/perl"),0)); @@ -1412,7 +1412,7 @@ char *path = (char *)table_get(r->subprocess_env, "PERL5LIB"); if (path) { - perl_incpush(path); + perl_inc_unshift(path); MP_INCPUSH_on(cld); } } 1.113 +1 -1 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- mod_perl.h24 Mar 2002 20:57:23 - 1.112 +++ mod_perl.h24 Mar 2002 23:01:33 - 1.113 @@ -1179,7 +1179,7 @@ void mod_perl_init_ids(void); int perl_eval_ok(server_rec *s); int perl_sv_is_http_code(SV *sv, int *status); -void perl_incpush(char *s); +void perl_inc_unshift(char *s); SV *mod_perl_sv_name(SV *svp); void mod_perl_mark_where(char *where, SV *sub); 1.47 +3 -2 modperl/src/modules/perl/perl_util.c Index: perl_util.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- perl_util.c 17 Apr 2001 21:30:02 - 1.46 +++ perl_util.c 24 Mar 2002 23:01:33 - 1.47 @@ -785,7 +785,7 @@ #define PERLLIB_SEP ':' #endif -void perl_incpush(char *p) +void perl_inc_unshift(char *p) { if(!p) return; @@ -803,7 +803,8 @@ sv_setpv(libdir, p); p = Nullch; } - av_push(GvAV(incgv), libdir); + av_unshift(GvAV(incgv), 1); + av_store(GvAV(incgv), 0, libdir); } }
cvs commit: modperl/src/modules/perl perl_config.c
dougm 02/03/24 14:51:04 Modified:.Changes STATUS src/modules/perl perl_config.c Log: Submitted by: Stephen Clouse <[EMAIL PROTECTED]> Reviewed by: dougm do not clear symbol tables within a package in perl_clear_symtab() used by directive handler extensions Revision ChangesPath 1.635 +4 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.634 retrieving revision 1.635 diff -u -r1.634 -r1.635 --- Changes 24 Mar 2002 22:06:39 - 1.634 +++ Changes 24 Mar 2002 22:51:04 - 1.635 @@ -10,6 +10,10 @@ =item 1.26_01-dev +do not clear symbol tables within a package in perl_clear_symtab() +used by directive handler extensions +[Stephen Clouse <[EMAIL PROTECTED]>] + properly deal with $r->status codes (e.g. redirect) in Apache::RegistryNG [Geoff Young <[EMAIL PROTECTED]>] 1.11 +1 -6 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- STATUS24 Mar 2002 22:06:39 - 1.10 +++ STATUS24 Mar 2002 22:51:04 - 1.11 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 22:06:39 $] + Last modified at [$Date: 2002/03/24 22:51:04 $] Release: @@ -21,11 +21,6 @@ Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 -* vanishing symbol tables -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=100820262006934&w=2 - Status: - patch available - * $r->finfo problem with HTML::Mason::ApacheHandler Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=96854561311519&w=2 Status: 1.114 +22 -1 modperl/src/modules/perl/perl_config.c Index: perl_config.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- perl_config.c 24 Mar 2002 21:00:06 - 1.113 +++ perl_config.c 24 Mar 2002 22:51:04 - 1.114 @@ -1666,6 +1666,27 @@ } } +static int gvhv_is_stash(GV *gv) +{ +int len = GvNAMELEN(gv); +char *name = GvNAME(gv); + +if ((len > 2) && +(name[len - 1] == ':') && +(name[len - 2] == ':')) +{ +return 1; +} + +return 0; +} + +/* + * we do not clear symbols within packages, the desired behavior + * for directive handler classes. and there should never be a package + * within the %Apache::ReadConfig. nothing else that i'm aware of calls + * this function, so we should be ok. + */ void perl_clear_symtab(HV *symtab) { SV *val; @@ -1684,7 +1705,7 @@ continue; if((sv = GvSV((GV*)val))) sv_setsv(GvSV((GV*)val), &sv_undef); - if((hv = GvHV((GV*)val))) + if((hv = GvHV((GV*)val)) && !gvhv_is_stash((GV*)val)) hv_clear(hv); if((av = GvAV((GV*)val))) av_clear(av);
cvs commit: modperl/lib/Apache RegistryNG.pm
dougm 02/03/24 14:06:39 Modified:.Changes STATUS lib/Apache RegistryNG.pm Log: Submitted by: Geoff Young Reviewed by: dougm properly deal with $r->status codes (e.g. redirect) in Apache::RegistryNG Revision ChangesPath 1.634 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.633 retrieving revision 1.634 diff -u -r1.633 -r1.634 --- Changes 24 Mar 2002 21:57:53 - 1.633 +++ Changes 24 Mar 2002 22:06:39 - 1.634 @@ -10,6 +10,9 @@ =item 1.26_01-dev +properly deal with $r->status codes (e.g. redirect) in +Apache::RegistryNG [Geoff Young <[EMAIL PROTECTED]>] + properly escape highbit chars in Apache::Utils::escape_html [Geoff Young <[EMAIL PROTECTED]>, Robin Berjon <[EMAIL PROTECTED]>] 1.10 +1 -6 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- STATUS24 Mar 2002 21:57:53 - 1.9 +++ STATUS24 Mar 2002 22:06:39 - 1.10 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 21:57:53 $] + Last modified at [$Date: 2002/03/24 22:06:39 $] Release: @@ -20,11 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97449481013350&w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 - -* Apache::RegistryNG issues -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101240123609773&w=2 - Status: - patch available * vanishing symbol tables Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=100820262006934&w=2 1.8 +7 -1 modperl/lib/Apache/RegistryNG.pm Index: RegistryNG.pm === RCS file: /home/cvs/modperl/lib/Apache/RegistryNG.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RegistryNG.pm 28 Sep 2000 19:59:39 - 1.7 +++ RegistryNG.pm 24 Mar 2002 22:06:39 - 1.8 @@ -48,9 +48,15 @@ $pr->set_mtime; } +my $old_status = $r->status; + $rc = $pr->run(@_); $pr->chdir_file("$Apache::Server::CWD/"); -return ($rc != OK) ? $rc : $pr->status; + +my $pr_status = $pr->status; +$r->status($old_status); + +return ($rc != OK) ? $rc : $pr_status; } 1;
cvs commit: modperl/t/net/perl util.pl
dougm 02/03/24 13:57:53 Modified:.Changes STATUS src/modules/perl Util.xs t/net/perl util.pl Log: Submitted by: Geoff Young <[EMAIL PROTECTED]> Reviewed by: dougm properly escape highbit chars in Apache::Utils::escape_html Revision ChangesPath 1.633 +4 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.632 retrieving revision 1.633 diff -u -r1.632 -r1.633 --- Changes 24 Mar 2002 21:00:05 - 1.632 +++ Changes 24 Mar 2002 21:57:53 - 1.633 @@ -10,6 +10,10 @@ =item 1.26_01-dev +properly escape highbit chars in Apache::Utils::escape_html +[Geoff Young <[EMAIL PROTECTED]>, +Robin Berjon <[EMAIL PROTECTED]>] + allow $r->auth_name and $r->auth_type to be set on win32 [John Kelly <[EMAIL PROTECTED]>] 1.9 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- STATUS24 Mar 2002 21:00:20 - 1.8 +++ STATUS24 Mar 2002 21:57:53 - 1.9 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 21:00:20 $] + Last modified at [$Date: 2002/03/24 21:57:53 $] Release: @@ -20,12 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97449481013350&w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 - -* Apache::Utils::escape_html issues -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101180404809059&w=2 - Status: - "patch" available - http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101188287032621&w=2 * Apache::RegistryNG issues Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101240123609773&w=2 1.10 +8 -1 modperl/src/modules/perl/Util.xs Index: Util.xs === RCS file: /home/cvs/modperl/src/modules/perl/Util.xs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Util.xs 4 Mar 2000 20:55:47 - 1.9 +++ Util.xs 24 Mar 2002 21:57:53 - 1.10 @@ -32,6 +32,9 @@ return sv; } +#define IS_HIGHBIT_CHAR(b) \ + ( (((unsigned char)(b)) > 126) && (((unsigned char)(b)) <= 255) ) + static SV *my_escape_html(char *s) { int i, j; @@ -43,7 +46,7 @@ j += 3; else if (s[i] == '&') j += 4; -else if (s[i] == '"') +else if (s[i] == '"' || IS_HIGHBIT_CHAR(s[i])) j += 5; if (j == 0) @@ -67,6 +70,10 @@ memcpy(&SvPVX(x)[j], """, 6); j += 5; } +else if (IS_HIGHBIT_CHAR(s[i])) { +sprintf(&SvPVX(x)[j], "&#%d;", (unsigned char)s[i]); +j += 5; +} else SvPVX(x)[j] = s[i]; 1.12 +5 -1 modperl/t/net/perl/util.pl Index: util.pl === RCS file: /home/cvs/modperl/t/net/perl/util.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- util.pl 6 Mar 2000 07:50:54 - 1.11 +++ util.pl 24 Mar 2002 21:57:53 - 1.12 @@ -2,7 +2,7 @@ use Apache::test; $|++; my $i = 0; -my $tests = 7; +my $tests = 8; my $r = shift; $r->send_http_header('text/plain'); @@ -61,6 +61,10 @@ EOF + +#XXX: this test could be more robust, but its better than nothing +my $c = Apache::Util::escape_html("\x8b"); +test ++$i, $c =~ /^&\#\d{3,3}\;$/; my $txt = "No html tags in here at all"; my $etxt = Apache::Util::escape_html($txt);
cvs commit: modperl STATUS
dougm 02/03/24 13:00:21 Modified:.STATUS Log: remove win32 item Revision ChangesPath 1.8 +1 -6 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- STATUS24 Mar 2002 20:53:41 - 1.7 +++ STATUS24 Mar 2002 21:00:20 - 1.8 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 20:53:41 $] + Last modified at [$Date: 2002/03/24 21:00:20 $] Release: @@ -20,11 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97449481013350&w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 - -* mod_perl.h issues for Win32 -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101253855721619&w=2 - Status: - patch available * Apache::Utils::escape_html issues Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101180404809059&w=2
cvs commit: modperl/src/modules/perl perl_config.c
dougm 02/03/24 13:00:06 Modified:.Changes src/modules/perl perl_config.c Log: Submitted by: John Kelly <[EMAIL PROTECTED]> Reviewed by: dougm allow $r->auth_name and $r->auth_type to be set on win32 Revision ChangesPath 1.632 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.631 retrieving revision 1.632 diff -u -r1.631 -r1.632 --- Changes 24 Mar 2002 20:57:23 - 1.631 +++ Changes 24 Mar 2002 21:00:05 - 1.632 @@ -10,6 +10,9 @@ =item 1.26_01-dev +allow $r->auth_name and $r->auth_type to be set on win32 +[John Kelly <[EMAIL PROTECTED]>] + fix compilation for win32 w/ apache 1.3.22+ [Randy Kobes <[EMAIL PROTECTED]>] 1.113 +0 -8 modperl/src/modules/perl/perl_config.c Index: perl_config.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -r1.112 -r1.113 --- perl_config.c 24 Mar 2002 20:45:17 - 1.112 +++ perl_config.c 24 Mar 2002 21:00:06 - 1.113 @@ -142,7 +142,6 @@ char *mod_perl_auth_name(request_rec *r, char *val) { -#ifndef WIN32 core_dir_config *conf = (core_dir_config *)get_module_config(r->per_dir_config, &core_module); @@ -153,14 +152,10 @@ } return conf->auth_name; -#else -return (char *) auth_name(r); -#endif } char *mod_perl_auth_type(request_rec *r, char *val) { -#ifndef WIN32 core_dir_config *conf = (core_dir_config *)get_module_config(r->per_dir_config, &core_module); @@ -171,9 +166,6 @@ } return conf->auth_type; -#else -return (char *) auth_type(r); -#endif } void mod_perl_dir_env(request_rec *r, perl_dir_config *cld)
cvs commit: modperl/src/modules/perl mod_perl.h
dougm 02/03/24 12:57:23 Modified:.Changes src/modules/perl mod_perl.h Log: Submitted by: Randy Kobes <[EMAIL PROTECTED]> Reviewed by: dougm fix compilation for win32 w/ apache 1.3.22+ Revision ChangesPath 1.631 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.630 retrieving revision 1.631 diff -u -r1.630 -r1.631 --- Changes 24 Mar 2002 20:45:17 - 1.630 +++ Changes 24 Mar 2002 20:57:23 - 1.631 @@ -10,6 +10,9 @@ =item 1.26_01-dev +fix compilation for win32 w/ apache 1.3.22+ +[Randy Kobes <[EMAIL PROTECTED]>] + fix multiple %LocationMatch in sections bug [Salvador Ortiz Garcia <[EMAIL PROTECTED]>] 1.112 +2 -0 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- mod_perl.h13 Aug 2001 16:02:20 - 1.111 +++ mod_perl.h24 Mar 2002 20:57:23 - 1.112 @@ -1089,8 +1089,10 @@ extern module MODULE_VAR_EXPORT perl_module; /* a couple for -Wall sanity sake */ +#ifndef WIN32 int translate_name (request_rec *); int log_transaction (request_rec *r); +#endif /* mod_perl prototypes */
cvs commit: modperl STATUS
dougm 02/03/24 12:53:41 Modified:.STATUS Log: address the print() dereferencing issue Revision ChangesPath 1.7 +14 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- STATUS24 Mar 2002 20:45:17 - 1.6 +++ STATUS24 Mar 2002 20:53:41 - 1.7 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 20:45:17 $] + Last modified at [$Date: 2002/03/24 20:53:41 $] Release: @@ -21,12 +21,6 @@ Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 -* PVIV issues -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=99905070209305&w=2 - Status: - patch available -http://marc.theaimsgroup.com/?l=apache-modperl&m=9116330145&w=2 - * mod_perl.h issues for Win32 Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101253855721619&w=2 Status: @@ -231,3 +225,16 @@ production environment, as it adds quite a bit of bloat * docs: update CREDITS, cleanup install docs + +Patches unlikely to be applied: + +* print() dereferencing issues +Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=99905070209305&w=2 + Status: + patch available +http://marc.theaimsgroup.com/?l=apache-modperl&m=9116330145&w=2 + + the feature of print() dereferencing scalars should be deprecated. + therefor, i don't think this patch should be applied as it + would introduce overhead to support a deprecated feature. + user should simply dereference themselves, print $$foo; -dougm
cvs commit: modperl/src/modules/perl perl_config.c
dougm 02/03/24 12:45:18 Modified:.Changes STATUS src/modules/perl perl_config.c Log: Submitted by: Salvador Ortiz Garcia <[EMAIL PROTECTED]> Reviewed by: dougm fix multiple %LocationMatch in sections bug Revision ChangesPath 1.630 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.629 retrieving revision 1.630 diff -u -r1.629 -r1.630 --- Changes 24 Mar 2002 19:06:03 - 1.629 +++ Changes 24 Mar 2002 20:45:17 - 1.630 @@ -10,6 +10,9 @@ =item 1.26_01-dev +fix multiple %LocationMatch in sections bug +[Salvador Ortiz Garcia <[EMAIL PROTECTED]>] + rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't need and apache won't compile with [Stas Bekman <[EMAIL PROTECTED]>] 1.6 +1 -7 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- STATUS24 Mar 2002 18:22:56 - 1.5 +++ STATUS24 Mar 2002 20:45:17 - 1.6 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 18:22:56 $] + Last modified at [$Date: 2002/03/24 20:45:17 $] Release: @@ -20,12 +20,6 @@ Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=97449481013350&w=2 Status: doc patch at http://marc.theaimsgroup.com/?l=apache-modperl&m=97450363501652&w=2 - -* %LocationMatch bug -Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=98260537428737&w=2 - Status: - may be fixed here -http://marc.theaimsgroup.com/?l=apache-modperl&m=101366182205497&w=2 * PVIV issues Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=99905070209305&w=2 1.112 +6 -3 modperl/src/modules/perl/perl_config.c Index: perl_config.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- perl_config.c 11 Jul 2001 03:02:26 - 1.111 +++ perl_config.c 24 Mar 2002 20:45:17 - 1.112 @@ -1166,6 +1166,8 @@ char *tmpkey; I32 tmpklen; SV *tmpval; +void *old_info = cmd->info; + (void)hv_iterinit(hv); while ((tmpval = hv_iternextsv(hv, &tmpkey, &tmpklen))) { char line[MAX_STRING_LEN]; @@ -1195,6 +1197,9 @@ if(errmsg) log_printf(cmd->server, ": %s", errmsg); } + +cmd->info = old_info; + /* Emulate the handling of end token for the section */ perl_set_config_vectors(cmd, cfg, &core_module); } @@ -1511,9 +1516,7 @@ void *dummy = perl_set_config_vectors(cmd, config, &core_module); void *old_info = cmd->info; -if (strstr(key, "Match")) { - cmd->info = (void*)key; -} +cmd->info = (void *)strstr(key, "Match"); if(strnEQ(key, "Location", 8)) perl_urlsection(cmd, dummy, hv);
cvs commit: modperl/lib/Apache ExtUtils.pm
dougm 02/03/24 11:06:03 Modified:.Changes Makefile.PL lib/Apache ExtUtils.pm Log: Submitted by: stas Reviewed by:dougm rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't need and apache won't compile with Revision ChangesPath 1.629 +3 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.628 retrieving revision 1.629 diff -u -r1.628 -r1.629 --- Changes 24 Mar 2002 18:22:56 - 1.628 +++ Changes 24 Mar 2002 19:06:03 - 1.629 @@ -10,6 +10,9 @@ =item 1.26_01-dev +rip -D_GNU_SOURCE out of Perl 5.7.3+'s ccflags, which modperl doesn't +need and apache won't compile with [Stas Bekman <[EMAIL PROTECTED]>] + make sure PerlSetEnv variables are visible after first access to each child [Geoff Young <[EMAIL PROTECTED]>] 1.199 +3 -0 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.198 retrieving revision 1.199 diff -u -r1.198 -r1.199 --- Makefile.PL 24 Mar 2002 02:07:58 - 1.198 +++ Makefile.PL 24 Mar 2002 19:06:03 - 1.199 @@ -386,6 +386,9 @@ $PERL_EXTRA_CFLAGS .= " $Config{ccflags}"; } +# apache-1.3.xx won't compile with -D_GNU_SOURCE +$PERL_EXTRA_CFLAGS =~ s/-D_GNU_SOURCE//; + for (keys %PassEnv) { $ENV{$_} = $$_ if $$_; } 1.24 +1 -0 modperl/lib/Apache/ExtUtils.pm Index: ExtUtils.pm === RCS file: /home/cvs/modperl/lib/Apache/ExtUtils.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ExtUtils.pm 25 Aug 2001 19:55:03 - 1.23 +++ ExtUtils.pm 24 Mar 2002 19:06:03 - 1.24 @@ -37,6 +37,7 @@ my %config_fixups = ( ccdlflags => sub { s/-R\s+/-R/; }, ccflags => sub { + s/-D_GNU_SOURCE//; unless ($Apache::MyConfig::Setup{PERL_USELARGEFILES}) { s/-D_LARGEFILE_SOURCE\s+-D_FILE_OFFSET_BITS=\d+//; }
cvs commit: modperl MANIFEST
dougm 02/03/23 19:02:45 Modified:.MANIFEST Log: add missing files to MANIFEST that caused t/internal/redirect #4 to fail Revision ChangesPath 1.70 +2 -0 modperl/MANIFEST Index: MANIFEST === RCS file: /home/cvs/modperl/MANIFEST,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- MANIFEST 6 Mar 2002 13:45:41 - 1.69 +++ MANIFEST 24 Mar 2002 03:02:44 - 1.70 @@ -173,6 +173,8 @@ t/net/perl/request-cookie.pl #t/net/perl/resolver.pl t/net/perl/io/redir.pl +t/net/perl/io/redir1.pl +t/net/perl/io/redir2.pl t/net/perl/io/perlio.pl t/net/perl/io/ssi1.pl t/net/perl/io/ssi2.pl
cvs commit: modperl/lib/Apache test.pm
dougm 02/03/23 18:55:44 Modified:lib/Apache test.pm Log: change lwp default to use HTTP/1.0, preventing a pile of warnings in t/internal/http-get Revision ChangesPath 1.24 +2 -0 modperl/lib/Apache/test.pm Index: test.pm === RCS file: /home/cvs/modperl/lib/Apache/test.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- test.pm 26 Aug 2001 18:29:55 - 1.23 +++ test.pm 24 Mar 2002 02:55:44 - 1.24 @@ -12,6 +12,8 @@ @EXPORT_OK = qw(have_httpd); BEGIN { +$ENV{PERL_LWP_USE_HTTP_10} = 1; #default to http/1.0 + if(not $ENV{MOD_PERL}) { eval { require "net/config.pl"; }; #for 'make test' $PERL_DIR = $net::perldir;
cvs commit: modperl/src/modules/perl perlio.c
dougm 02/03/23 18:17:10 Modified:.STATUS src/modules/perl perlio.c Log: fix tiehandle fix so it will compile with Perls < 5.6.0 and fold some duplication in the original patch Revision ChangesPath 1.4 +1 -5 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- STATUS24 Mar 2002 02:07:58 - 1.3 +++ STATUS24 Mar 2002 02:17:09 - 1.4 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/24 02:07:58 $] + Last modified at [$Date: 2002/03/24 02:17:09 $] Release: @@ -120,10 +120,6 @@ * Apache->server->register_cleanup Report: ? Status: - -* bleedperl TIEHANDLE issues? -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=99909095916498&w=2 -Status: * Apache->request(bless {r => $r}, 'My::Apache') Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98600785703290&w=2 1.9 +10 -13modperl/src/modules/perl/perlio.c Index: perlio.c === RCS file: /home/cvs/modperl/src/modules/perl/perlio.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- perlio.c 19 Mar 2002 02:18:02 - 1.8 +++ perlio.c 24 Mar 2002 02:17:10 - 1.9 @@ -51,25 +51,22 @@ #define dHANDLE(name) GV *handle = gv_fetchpv(name, TRUE, SVt_PVIO) -#if (PERL_REVISION == 5 && PERL_VERSION < 7) +#ifdef PERL_REVISION +# if ((PERL_REVISION == 5) && (PERL_VERSION >= 7)) +# define TIEHANDLE_SV(handle) (SV*)GvIOp((SV*)handle) +# endif +#endif -#define TIEHANDLE(name,obj) \ -{ \ - dHANDLE(name); \ - sv_unmagic((SV*)handle, 'q'); \ - sv_magic((SV*)handle, obj, 'q', Nullch, 0); \ -} - -#else +#ifndef TIEHANDLE_SV +# define TIEHANDLE_SV(handle) (SV*)handle +#endif #define TIEHANDLE(name,obj) \ { \ dHANDLE(name); \ - sv_unmagic((SV*)GvIOp((SV*)handle), 'q'); \ - sv_magic((SV*)GvIOp((SV*)handle), obj, 'q', Nullch, 0); \ + sv_unmagic(TIEHANDLE_SV(handle), 'q'); \ + sv_magic(TIEHANDLE_SV(handle), obj, 'q', Nullch, 0); \ } - -#endif #if 0 #define TIED tied_handle
cvs commit: modperl/Constants Constants.pm
dougm 02/03/23 18:07:58 Modified:.Changes Makefile.PL STATUS Constants Constants.pm Log: workaround Apache::Constants::AUTOLOAD problem with bleedperl Revision ChangesPath 1.627 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.626 retrieving revision 1.627 diff -u -r1.626 -r1.627 --- Changes 22 Mar 2002 19:58:13 - 1.626 +++ Changes 24 Mar 2002 02:07:58 - 1.627 @@ -10,6 +10,8 @@ =item 1.26_01-dev +workaround Apache::Constants::AUTOLOAD problem with bleedperl + the first flag argument to perl cannot start with space, since perl tries to open the " -spi.bak" as a file. fix that in the win32 case. [Stas Bekman <[EMAIL PROTECTED]>] 1.198 +1 -1 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.197 retrieving revision 1.198 diff -u -r1.197 -r1.198 --- Makefile.PL 22 Mar 2002 19:58:13 - 1.197 +++ Makefile.PL 24 Mar 2002 02:07:58 - 1.198 @@ -96,7 +96,7 @@ my $PWD = cwd; $ENV{APACHE_CWD} = $PWD; -$ENV{PERL5LIB} = "$PWD/lib"; +$ENV{PERL5LIB} = join ':', "$PWD/lib", $ENV{PERL5LIB}; my %SSL = ( "modules/ssl/apache_ssl.c" => "Ben-SSL", 1.3 +1 -5 modperl/STATUS Index: STATUS === RCS file: /home/cvs/modperl/STATUS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- STATUS22 Mar 2002 20:03:34 - 1.2 +++ STATUS24 Mar 2002 02:07:58 - 1.3 @@ -1,5 +1,5 @@ mod_perl 1.3 STATUS: - Last modified at [$Date: 2002/03/22 20:03:34 $] + Last modified at [$Date: 2002/03/24 02:07:58 $] Release: @@ -124,10 +124,6 @@ * bleedperl TIEHANDLE issues? Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=99909095916498&w=2 Status: - -* bleedperl AUTOLOAD XSUB issues -Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=101477676216889&w=2 - Status: * Apache->request(bless {r => $r}, 'My::Apache') Report: http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=98600785703290&w=2 1.22 +14 -12modperl/Constants/Constants.pm Index: Constants.pm === RCS file: /home/cvs/modperl/Constants/Constants.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Constants.pm 28 Sep 2000 15:18:54 - 1.21 +++ Constants.pm 24 Mar 2002 02:07:58 - 1.22 @@ -14,20 +14,22 @@ *import = \&Exporter::import; } +sub autoload { +if (defined &__AUTOLOAD) { #make extra sure we don't recurse +#why must we stringify first??? +__AUTOLOAD() if "$Apache::Constants::AUTOLOAD"; +goto &$Apache::Constants::AUTOLOAD; +} +else { +require Carp; +Carp::confess("__AUTOLOAD is undefined, ", + "trying to AUTOLOAD $Apache::Constants::AUTOLOAD"); +} +} + if ($ENV{MOD_PERL}) { #outside of mod_perl this will recurse looking for __AUTOLOAD, grr -*AUTOLOAD = sub { -if (defined &__AUTOLOAD) { #make extra sure we don't recurse -#why must we stringify first??? -__AUTOLOAD() if "$Apache::Constants::AUTOLOAD"; -goto &$Apache::Constants::AUTOLOAD; -} -else { -require Carp; -Carp::confess("__AUTOLOAD is undefined, ", - "trying to AUTOLOAD $Apache::Constants::AUTOLOAD"); -} -}; +*AUTOLOAD = \&autoload; } my %ConstNameCache = ();
cvs commit: modperl-2.0/src/modules/perl modperl_log.h
dougm 02/03/13 09:21:53 Modified:src/modules/perl modperl_log.h Log: Submitted by: Philippe M. Chiasson <[EMAIL PROTECTED]> Reviewed by: dougm fix MP_FUNC for gcc3 Revision ChangesPath 1.7 +9 -4 modperl-2.0/src/modules/perl/modperl_log.h Index: modperl_log.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_log.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- modperl_log.h 11 Oct 2001 19:14:06 - 1.6 +++ modperl_log.h 13 Mar 2002 17:21:53 - 1.7 @@ -2,10 +2,15 @@ #define MODPERL_LOG_H #ifdef MP_TRACE -/* XXX: not every cc supports this - * sort out later - */ -# define MP_FUNC __FUNCTION__ +# if defined(__GNUC__) +# if (__GNUC__ > 2) +# define MP_FUNC __func__ +# else +# define MP_FUNC __FUNCTION__ +# endif +# else +# define MP_FUNC "MP_FUNC" +# endif #else # define MP_FUNC "MP_FUNC" #endif
cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
dougm 02/03/09 16:17:05 Modified:xs/tables/current/Apache ConstantsTable.pm FunctionTable.pm StructureTable.pm xs/tables/current/ModPerl FunctionTable.pm Log: sync Revision ChangesPath 1.22 +4 -3 modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm Index: ConstantsTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- ConstantsTable.pm 20 Jan 2002 18:35:26 - 1.21 +++ ConstantsTable.pm 10 Mar 2002 00:17:05 - 1.22 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Sun Jan 20 10:13:22 2002 +# ! Sat Mar 9 16:13:55 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -133,8 +133,9 @@ 'HTTP_NOT_EXTENDED' ], 'filter_type' => [ - 'AP_FTYPE_CONTENT', - 'AP_FTYPE_HTTP_HEADER', + 'AP_FTYPE_RESOURCE', + 'AP_FTYPE_CONTENT_SET', + 'AP_FTYPE_PROTOCOL', 'AP_FTYPE_TRANSCODE', 'AP_FTYPE_CONNECTION', 'AP_FTYPE_NETWORK' 1.34 +334 -146 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- FunctionTable.pm 30 Jan 2002 03:29:38 - 1.33 +++ FunctionTable.pm 10 Mar 2002 00:17:05 - 1.34 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Tue Jan 29 19:27:23 2002 +# ! Sat Mar 9 16:14:02 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -848,7 +848,7 @@ 'name' => 'ap_explode_recent_gmt', 'args' => [ { -'type' => 'apr_exploded_time_t *', +'type' => 'apr_time_exp_t *', 'name' => 'tm' }, { @@ -862,7 +862,7 @@ 'name' => 'ap_explode_recent_localtime', 'args' => [ { -'type' => 'apr_exploded_time_t *', +'type' => 'apr_time_exp_t *', 'name' => 'tm' }, { @@ -1158,6 +1158,16 @@ ] }, { +'return_type' => 'ap_filter_rec_t *', +'name' => 'ap_get_input_filter_handle', +'args' => [ + { +'type' => 'const char *', +'name' => 'name' + } +] + }, + { 'return_type' => 'apr_off_t', 'name' => 'ap_get_limit_req_body', 'args' => [ @@ -1202,6 +1212,16 @@ ] }, { +'return_type' => 'ap_filter_rec_t *', +'name' => 'ap_get_output_filter_handle', +'args' => [ + { +'type' => 'const char *', +'name' => 'name' + } +] + }, + { 'return_type' => 'const char *', 'name' => 'ap_get_remote_host', 'args' => [ @@ -1505,11 +1525,6 @@ ] }, { -'return_type' => 'int', -'name' => 'ap_graceful_stop_signalled', -'args' => [] - }, - { 'return_type' => 'void', 'name' => 'ap_hook_access_checker', 'args' => [ @@ -1599,6 +1614,28 @@ }, { 'return_type' => 'void', +'name' => 'ap_hook_create_connection', +'args' => [ + { +'type' => 'ap_HOOK_create_connection_t *', +'name' => 'pf' + }, + { +'type' => 'const char * const *', +'name' => 'aszPre' + }, + { +'type' => 'const char * const *', +'name' => 'asz
cvs commit: modperl-2.0/xs/maps apache_functions.map
dougm 02/03/09 16:14:23 Modified:xs/maps apache_functions.map Log: Submitted by: Philippe M. Chiasson <[EMAIL PROTECTED]> Reviewed by: dougm fix $r->no_cache Revision ChangesPath 1.45 +0 -1 modperl-2.0/xs/maps/apache_functions.map Index: apache_functions.map === RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- apache_functions.map 26 Feb 2002 19:04:24 - 1.44 +++ apache_functions.map 10 Mar 2002 00:14:23 - 1.45 @@ -42,7 +42,6 @@ !ap_content_type_tolower ap_get_status_line ap_is_initial_req - mpxs_Apache__RequestRec_no_cache ap_method_register >ap_method_registry_init >ap_process_request_internal
cvs commit: modperl-2.0/xs/maps apr_structures.map apr_types.map
dougm 02/03/09 16:11:50 Modified:xs/maps apr_structures.map apr_types.map Log: Submitted by: Philippe M. Chiasson <[EMAIL PROTECTED]> Reviewed by: dougm adjust to apr_exploded_time_t => apr_time_exp_t rename Revision ChangesPath 1.7 +2 -2 modperl-2.0/xs/maps/apr_structures.map Index: apr_structures.map === RCS file: /home/cvs/modperl-2.0/xs/maps/apr_structures.map,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- apr_structures.map10 Sep 2001 05:49:04 - 1.6 +++ apr_structures.map10 Mar 2002 00:11:50 - 1.7 @@ -67,7 +67,7 @@ err -! +! tm_usec tm_sec tm_min @@ -79,7 +79,7 @@ tm_yday tm_isdst tm_gmtoff - + #generic data structures 1.12 +1 -1 modperl-2.0/xs/maps/apr_types.map Index: apr_types.map === RCS file: /home/cvs/modperl-2.0/xs/maps/apr_types.map,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- apr_types.map 31 Dec 2001 12:11:48 - 1.11 +++ apr_types.map 10 Mar 2002 00:11:50 - 1.12 @@ -78,7 +78,7 @@ apr_other_child_rec_t| UNDEFINED #time stuff -struct apr_exploded_time_t| APR::ExplodedTime +struct apr_time_exp_t| APR::ExplodedTime struct apr_os_exp_time_t | UNDEFINED struct apr_os_imp_time_t | NOTIMPL
cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_filter.c
dougm 02/03/09 16:09:52 Modified:src/modules/perl mod_perl.c modperl_filter.c Log: Submitted by: Philippe M. Chiasson <[EMAIL PROTECTED]> Reviewed by: dougm sync with filter name changes Revision ChangesPath 1.109 +2 -2 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -r1.108 -r1.109 --- mod_perl.c26 Feb 2002 19:01:38 - 1.108 +++ mod_perl.c10 Mar 2002 00:09:52 - 1.109 @@ -504,11 +504,11 @@ ap_register_output_filter(MODPERL_OUTPUT_FILTER_NAME, modperl_output_filter_handler, - AP_FTYPE_CONTENT); + AP_FTYPE_CONTENT_SET); ap_register_input_filter(MODPERL_INPUT_FILTER_NAME, modperl_input_filter_handler, - AP_FTYPE_CONTENT); + AP_FTYPE_CONTENT_SET); ap_hook_pre_connection(modperl_hook_pre_connection, NULL, NULL, APR_HOOK_FIRST); 1.32 +1 -1 modperl-2.0/src/modules/perl/modperl_filter.c Index: modperl_filter.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- modperl_filter.c 25 Jan 2002 04:04:22 - 1.31 +++ modperl_filter.c 10 Mar 2002 00:09:52 - 1.32 @@ -506,7 +506,7 @@ ctx = (modperl_filter_ctx_t *)apr_pcalloc(r->pool, sizeof(*ctx)); ctx->handler = handlers[i]; -addfunc(name, (void*)ctx, r, NULL); +addfunc(name, (void*)ctx, r, r->connection); } return OK;
cvs commit: modperl-2.0/src/modules/perl modperl_tipool.c
dougm 02/03/07 18:48:01 Modified:src/modules/perl modperl_tipool.c Log: Submitted by: Philippe M. Chiasson <[EMAIL PROTECTED]> Reviewed by: dougm prevent possible segv if one uses modperl_tipool_putback_data with an item that was never part of the pool. Revision ChangesPath 1.7 +6 -0 modperl-2.0/src/modules/perl/modperl_tipool.c Index: modperl_tipool.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_tipool.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- modperl_tipool.c 4 Mar 2001 18:49:39 - 1.6 +++ modperl_tipool.c 8 Mar 2002 02:48:01 - 1.7 @@ -286,6 +286,12 @@ tipool->busy = modperl_list_remove_data(tipool->busy, data, &listp); } +if (!listp) { +/* XXX: Attempt to putback something that was never there */ +modperl_tipool_unlock(tipool); +return; +} + tipool->idle = modperl_list_prepend(tipool->idle, listp); tipool->in_use--;
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 02/03/01 10:44:36 Modified:lib/Apache ParseSource.pm Log: skip header files that #include apr_optional.h Revision ChangesPath 1.36 +2 -1 modperl-2.0/lib/Apache/ParseSource.pm Index: ParseSource.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- ParseSource.pm21 Feb 2002 01:50:41 - 1.35 +++ ParseSource.pm1 Mar 2002 18:44:36 - 1.36 @@ -105,7 +105,8 @@ my @includes; my $unwanted = join '|', qw(ap_listen internal version apr_optional mod_include mod_cgi mod_proxy -mod_ssl ssl_ apr_anylock apr_rmm); +mod_ssl ssl_ apr_anylock apr_rmm +ap_config mod_log_config); for my $dir (@dirs) { File::Find::finddepth({
cvs commit: modperl-2.0/src/modules/perl modperl_perl.c
dougm 02/02/28 19:30:04 Modified:src/modules/perl modperl_perl.c Log: trickery to prevent perl_destruct from freeing the environ array does not work in win32 service shutdown. pull a different stunt to get the same effect, preventing the server from crashing. Revision ChangesPath 1.11 +18 -0 modperl-2.0/src/modules/perl/modperl_perl.c Index: modperl_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- modperl_perl.c11 Dec 2001 04:43:36 - 1.10 +++ modperl_perl.c1 Mar 2002 03:30:03 - 1.11 @@ -85,6 +85,7 @@ void modperl_perl_destruct(PerlInterpreter *perl) { +char **orig_environ = NULL; dTHXa(perl); PERL_SET_CONTEXT(perl); @@ -97,7 +98,20 @@ * at least, not if modperl is doing things right * this is a bug in Perl. */ +# ifdef WIN32 +/* + * PL_origenviron = environ; doesn't work under win32 service. + * we pull a different stunt here that has the same effect of + * tricking perl into _not_ freeing the real 'environ' array. + * instead temporarily swap with a dummy array we malloc + * here which is ok to let perl free. + */ +orig_environ = environ; +environ = safemalloc(2 * sizeof(char *)); +environ[0] = NULL; +# else PL_origenviron = environ; +# endif #endif if (PL_endav) { @@ -113,4 +127,8 @@ #ifndef WIN32 perl_free(perl); #endif + +if (orig_environ) { +environ = orig_environ; +} }
cvs commit: modperl-2.0/t/modules include.t
dougm 02/02/26 11:13:44 Added: t/modules include.t Log: test for mod_include include virtual of a mod_perl script Revision ChangesPath 1.1 modperl-2.0/t/modules/include.t Index: include.t === use strict; use warnings FATAL => 'all'; use Apache::Test; use Apache::TestRequest; use Apache::TestUtil; #test for mod_include include virtual of a mod_perl script my @patterns = ( 'mod_perl mod_include test', 'Hello World', 'footer', ); plan tests => 2 + @patterns, ['include']; my $location = "/includes/test.shtml"; my($res, $str); $res = GET $location; ok $res->is_success; $str = $res->content; ok $str; for my $pat (@patterns) { ok t_cmp(qr{$pat}, $str, "/$pat/"); }
cvs commit: modperl-2.0/t/conf extra.conf.in
dougm 02/02/26 11:12:04 Modified:t/conf extra.conf.in Log: configuration for mod_include+mod_perl test Revision ChangesPath 1.2 +12 -0 modperl-2.0/t/conf/extra.conf.in Index: extra.conf.in === RCS file: /home/cvs/modperl-2.0/t/conf/extra.conf.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- extra.conf.in 6 Sep 2001 04:58:43 - 1.1 +++ extra.conf.in 26 Feb 2002 19:12:04 - 1.2 @@ -1,3 +1,15 @@ # make sure that we test under Taint mode PerlSwitches -T +#for t/modules/include.t + +AddOutputFilter INCLUDES .shtml +Options Indexes FollowSymLinks IncludesNoExec + + + +SetHandler perl-script +Options +ExecCGI +PerlResponseHandler ModPerl::Registry +PerlOptions +ParseHeaders +
cvs commit: modperl-2.0/t/htdocs/includes-registry test.pl
dougm 02/02/26 11:10:38 Added: t/htdocs/includes-registry test.pl Log: test for mod_include include virtual of a mod_perl script Revision ChangesPath 1.1 modperl-2.0/t/htdocs/includes-registry/test.pl Index: test.pl === print "Content-type: text/html\n\n"; print "Hello World\n";
cvs commit: modperl-2.0/t/htdocs/includes footer.shtml header.shtml test.shtml
dougm 02/02/26 11:10:04 Added: t/htdocs/includes footer.shtml header.shtml test.shtml Log: some test files for mod_include+mod_perl tests Revision ChangesPath 1.1 modperl-2.0/t/htdocs/includes/footer.shtml Index: footer.shtml === footer 1.1 modperl-2.0/t/htdocs/includes/header.shtml Index: header.shtml === 1.1 modperl-2.0/t/htdocs/includes/test.shtml Index: test.shtml === [back]
cvs commit: modperl-2.0/t/htdocs/includes-registry - New directory
dougm 02/02/26 11:09:21 modperl-2.0/t/htdocs/includes-registry - New directory
cvs commit: modperl-2.0/t/htdocs/includes - New directory
dougm 02/02/26 11:09:21 modperl-2.0/t/htdocs/includes - New directory
cvs commit: modperl-2.0/t/htdocs .cvsignore
dougm 02/02/26 11:09:10 Added: t/htdocs .cvsignore Log: ignore Revision ChangesPath 1.1 modperl-2.0/t/htdocs/.cvsignore Index: .cvsignore === index.html perlio testdirective util
cvs commit: modperl-2.0/t .cvsignore
dougm 02/02/26 11:07:30 Modified:t.cvsignore Log: we have an htdocs directory now Revision ChangesPath 1.5 +0 -1 modperl-2.0/t/.cvsignore Index: .cvsignore === RCS file: /home/cvs/modperl-2.0/t/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- .cvsignore31 Dec 2001 08:45:13 - 1.4 +++ .cvsignore26 Feb 2002 19:07:30 - 1.5 @@ -2,5 +2,4 @@ SMOKE REPORT .gdb-test-start -htdocs logs
cvs commit: modperl-2.0/t/htdocs - New directory
dougm 02/02/26 11:07:00 modperl-2.0/t/htdocs - New directory
cvs commit: modperl-2.0/xs/maps apache_functions.map
dougm 02/02/26 11:04:25 Modified:xs/maps apache_functions.map Log: call the modperl wrapper for ap_run_sub_req Revision ChangesPath 1.44 +1 -1 modperl-2.0/xs/maps/apache_functions.map Index: apache_functions.map === RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- apache_functions.map 25 Jan 2002 04:04:22 - 1.43 +++ apache_functions.map 26 Feb 2002 19:04:24 - 1.44 @@ -81,7 +81,7 @@ PACKAGE=Apache::SubRequest ISA=Apache::RequestRec ap_destroy_sub_req | | r | DESTROY - ap_run_sub_req | | r | run + ap_run_sub_req | mpxs_ | | run MODULE=Apache::RequestIO PACKAGE=Apache::RequestRec ap_discard_request_body
cvs commit: modperl-2.0/xs/Apache/SubRequest Apache__SubRequest.h
dougm 02/02/26 11:03:58 Added: xs/Apache/SubRequest Apache__SubRequest.h Log: moving the subrequest special case here, to flush main output buffer before running a subrequest. Revision ChangesPath 1.1 modperl-2.0/xs/Apache/SubRequest/Apache__SubRequest.h Index: Apache__SubRequest.h === static MP_INLINE int mpxs_ap_run_sub_req(pTHX_ request_rec *r) { /* need to flush main request output buffer if any * before running any subrequests, else we get subrequest * output before anything already written in the main request */ if (r->main) { modperl_config_req_t *rcfg = modperl_config_req_get(r->main); modperl_wbucket_flush(rcfg->wbucket); } return ap_run_sub_req(r); }
cvs commit: modperl-2.0/xs/Apache/SubRequest - New directory
dougm 02/02/26 11:01:44 modperl-2.0/xs/Apache/SubRequest - New directory
cvs commit: modperl-2.0/src/modules/perl mod_perl.c
dougm 02/02/26 11:01:38 Modified:src/modules/perl mod_perl.c Log: remove remaining special cases for subrequests Revision ChangesPath 1.108 +7 -15 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -r1.107 -r1.108 --- mod_perl.c26 Feb 2002 18:00:58 - 1.107 +++ mod_perl.c26 Feb 2002 19:01:38 - 1.108 @@ -447,18 +447,6 @@ modperl_config_req_init(r, rcfg); -if (r->main) { -modperl_config_req_t *main_rcfg = -modperl_config_req_get(r->main); - -rcfg->wbucket = main_rcfg->wbucket; -} -else { -rcfg->wbucket = -(modperl_wbucket_t *)apr_palloc(r->pool, -sizeof(*rcfg->wbucket)); -} - return OK; } @@ -588,11 +576,15 @@ { MP_dRCFG; MP_dDCFG; -modperl_wbucket_t *wb = rcfg->wbucket; +modperl_wbucket_t *wb; -if (r->main && wb->pool) { -return; /* using bucket from main request */ +if (!rcfg->wbucket) { +rcfg->wbucket = +(modperl_wbucket_t *)apr_palloc(r->pool, +sizeof(*rcfg->wbucket)); } + +wb = rcfg->wbucket; /* setup buffer for output */ wb->pool = r->pool;
cvs commit: modperl-2.0/src/modules/perl mod_perl.c
dougm 02/02/26 10:00:58 Modified:src/modules/perl mod_perl.c Log: fixing bugs when mod_perl is invoked via mod_include include virtual: - modperl_response_init needs to initialize wbucket in subrequests where there is no wbucket in the main request - modperl_response_handler_cgi needs to always tie/untie *STD{IN,OUT} and %ENV regardless of being in the main request or a subrequest Revision ChangesPath 1.107 +8 -12 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -r1.106 -r1.107 --- mod_perl.c21 Feb 2002 01:45:34 - 1.106 +++ mod_perl.c26 Feb 2002 18:00:58 - 1.107 @@ -590,8 +590,8 @@ MP_dDCFG; modperl_wbucket_t *wb = rcfg->wbucket; -if (r->main) { -return; +if (r->main && wb->pool) { +return; /* using bucket from main request */ } /* setup buffer for output */ @@ -668,21 +668,17 @@ modperl_env_request_populate(aTHX_ r); } -if (!r->main) { -h_stdout = modperl_io_tie_stdout(aTHX_ r); -h_stdin = modperl_io_tie_stdin(aTHX_ r); +h_stdout = modperl_io_tie_stdout(aTHX_ r); +h_stdin = modperl_io_tie_stdin(aTHX_ r); -modperl_env_request_tie(aTHX_ r); -} +modperl_env_request_tie(aTHX_ r); retval = modperl_response_handler_run(r, FALSE); -if (!r->main) { -modperl_io_handle_untie(aTHX_ h_stdout); -modperl_io_handle_untie(aTHX_ h_stdin); +modperl_io_handle_untie(aTHX_ h_stdout); +modperl_io_handle_untie(aTHX_ h_stdin); -modperl_env_request_untie(aTHX_ r); -} +modperl_env_request_untie(aTHX_ r); modperl_perl_global_request_restore(aTHX_ r);
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 02/02/20 17:50:41 Modified:lib/Apache ParseSource.pm Log: c-scan chokes on netinet/tcp.h, add a -D_NETINET_TCP_H to trick cpp into skipping inclusion of it. add comments for other defines. Revision ChangesPath 1.35 +14 -3 modperl-2.0/lib/Apache/ParseSource.pm Index: ParseSource.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- ParseSource.pm20 Jan 2002 18:36:07 - 1.34 +++ ParseSource.pm21 Feb 2002 01:50:41 - 1.35 @@ -50,6 +50,12 @@ } } +my @c_scan_defines = ( +'CORE_PRIVATE', #so we get all of apache +'MP_SOURCE_SCAN', #so we can avoid some c-scan barfing +'_NETINET_TCP_H', #c-scan chokes on netinet/tcp.h +); + sub scan { require C::Scan; C::Scan->VERSION(0.75); @@ -61,11 +67,16 @@ $c->set(includeDirs => $self->includes); -my $defines = '-DCORE_PRIVATE -DMP_SOURCE_SCAN'; +my @defines = @c_scan_defines; + unless ($Config{useithreads} and $Config{useithreads} eq 'define') { -$defines .= ' -DMP_SOURCE_SCAN_NEED_ITHREADS'; +#fake -DITHREADS so function tables are the same for +#vanilla and ithread perls, that is, +#make sure THX and friends are always expanded +push @defines, 'MP_SOURCE_SCAN_NEED_ITHREADS'; } -$c->set(Defines => $defines); + +$c->set(Defines => join ' ', map "-D$_", @defines); bless $c, 'Apache::ParseSource::Scan'; }
cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_callback.c modperl_callback.h modperl_types.h
dougm 02/02/20 17:45:34 Modified:lib/ModPerl Code.pm src/modules/perl mod_perl.c modperl_callback.c modperl_callback.h modperl_types.h Log: adjust to pre_connection hook prototype change. not supporting PreConnection handler for the moment. Revision ChangesPath 1.75 +8 -2 modperl-2.0/lib/ModPerl/Code.pm Index: Code.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- Code.pm 18 Dec 2001 05:58:54 - 1.74 +++ Code.pm 21 Feb 2002 01:45:34 - 1.75 @@ -18,7 +18,8 @@ Access Authen Authz Type Fixup Response Log InputFilter OutputFilter)], #Init Cleanup -Connection => [qw(PreConnection ProcessConnection)], +Connection => [qw(ProcessConnection)], +PreConnection => [qw(PreConnection)], ); my %hooks = map { $_, canon_lc($_) } @@ -47,6 +48,11 @@ ret => 'int', args => [{type => 'conn_rec', name => 'c'}], }, +PreConnection => { +ret => 'int', +args => [{type => 'conn_rec', name => 'c'}, + {type => 'void', name => 'csd'}], +}, ); $hook_proto{PerDir} = $hook_proto{PerSrv}; @@ -73,7 +79,7 @@ }, ); -for my $class (qw(Process Connection Files)) { +for my $class (qw(Process Connection PreConnection Files)) { $directive_proto{$class}->{cfg}->{name} = 'scfg'; $directive_proto{$class}->{cfg}->{get} = $scfg_get; 1.106 +1 -1 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- mod_perl.c18 Jan 2002 06:50:10 - 1.105 +++ mod_perl.c21 Feb 2002 01:45:34 - 1.106 @@ -414,7 +414,7 @@ */ } -static int modperl_hook_pre_connection(conn_rec *c) +static int modperl_hook_pre_connection(conn_rec *c, void *csd) { modperl_input_filter_register_connection(c); modperl_output_filter_register_connection(c); 1.48 +5 -0 modperl-2.0/src/modules/perl/modperl_callback.c Index: modperl_callback.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- modperl_callback.c24 Nov 2001 01:15:01 - 1.47 +++ modperl_callback.c21 Feb 2002 01:45:34 - 1.48 @@ -217,6 +217,11 @@ NULL, NULL, NULL); } +int modperl_callback_pre_connection(int idx, conn_rec *c, void *csd) +{ +return DECLINED; /*XXX*/ +} + void modperl_callback_process(int idx, apr_pool_t *p, server_rec *s) { modperl_callback_run_handlers(idx, MP_HANDLER_TYPE_PROCESS, 1.21 +2 -0 modperl-2.0/src/modules/perl/modperl_callback.h Index: modperl_callback.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- modperl_callback.h24 Nov 2001 01:15:01 - 1.20 +++ modperl_callback.h21 Feb 2002 01:45:34 - 1.21 @@ -25,6 +25,8 @@ int modperl_callback_connection(int idx, conn_rec *c); +int modperl_callback_pre_connection(int idx, conn_rec *c, void *csd); + void modperl_callback_process(int idx, apr_pool_t *p, server_rec *s); int modperl_callback_files(int idx, 1.56 +1 -0 modperl-2.0/src/modules/perl/modperl_types.h Index: modperl_types.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- modperl_types.h 6 Jan 2002 20:45:36 - 1.55 +++ modperl_types.h 21 Feb 2002 01:45:34 - 1.56 @@ -119,6 +119,7 @@ MpAV *handlers_per_srv[MP_HANDLER_NUM_PER_SRV]; MpAV *handlers_files[MP_HANDLER_NUM_FILES]; MpAV *handlers_process[MP_HANDLER_NUM_PROCESS]; +MpAV *handlers_pre_connection[MP_HANDLER_NUM_PRE_CONNECTION]; MpAV *handlers_connection[MP_HANDLER_NUM_CONNECTION]; int threaded_mpm; #ifdef USE_ITHREADS
cvs commit: modperl-2.0/lib/ModPerl TypeMap.pm
dougm 02/02/20 17:40:03 Modified:lib/ModPerl TypeMap.pm Log: loosen aTHX check; might be "register PerlInterpreter" Revision ChangesPath 1.13 +1 -1 modperl-2.0/lib/ModPerl/TypeMap.pm Index: TypeMap.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- TypeMap.pm7 Nov 2001 03:14:54 - 1.12 +++ TypeMap.pm21 Feb 2002 01:40:03 - 1.13 @@ -203,7 +203,7 @@ return unless $first; -if ($first->{type} =~ /^PerlInterpreter/) { +if ($first->{type} =~ /PerlInterpreter/) { shift @{ $func->{args} }; $func->{thx} = 1; }
cvs commit: modperl-2.0/xs/APR/APR APR.xs
dougm 02/02/01 12:00:53 Modified:xs/APR/APR APR.xs Log: specify prototyping behavior to shutup xsubpp Revision ChangesPath 1.4 +2 -0 modperl-2.0/xs/APR/APR/APR.xs Index: APR.xs === RCS file: /home/cvs/modperl-2.0/xs/APR/APR/APR.xs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- APR.xs22 Oct 2001 03:26:03 - 1.3 +++ APR.xs1 Feb 2002 20:00:53 - 1.4 @@ -13,6 +13,8 @@ MODULE = APRPACKAGE = APR +PROTOTYPES: disable + BOOT: file = file; /* -Wall */ apr_initialize();
cvs commit: modperl-2.0/xs/Apache/Connection Apache__Connection.h
dougm 02/01/29 19:30:24 Modified:xs/Apache/Connection Apache__Connection.h Log: conn_rec.client_socket has gone away again Revision ChangesPath 1.3 +0 -9 modperl-2.0/xs/Apache/Connection/Apache__Connection.h Index: Apache__Connection.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/Connection/Apache__Connection.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Apache__Connection.h 29 Jan 2002 16:32:25 - 1.2 +++ Apache__Connection.h 30 Jan 2002 03:30:24 - 1.3 @@ -2,8 +2,6 @@ apr_socket_t *mpxs_Apache__Connection_client_socket(pTHX_ conn_rec *c, apr_socket_t *s) { -/* XXX: until minds are made up */ -#if 0 apr_socket_t *socket = ap_get_module_config(c->conn_config, &core_module); @@ -12,11 +10,4 @@ } return socket; -#else -if (s) { -c->client_socket = s; -} - -return c->client_socket; -#endif }
cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
dougm 02/01/29 19:29:38 Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm xs/tables/current/ModPerl FunctionTable.pm Log: sync Revision ChangesPath 1.33 +42 -1 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- FunctionTable.pm 29 Jan 2002 05:35:34 - 1.32 +++ FunctionTable.pm 30 Jan 2002 03:29:38 - 1.33 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Mon Jan 28 20:30:40 2002 +# ! Tue Jan 29 19:27:23 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -1757,6 +1757,11 @@ }, { 'return_type' => 'apr_array_header_t *', +'name' => 'ap_hook_get_install_transport_filters', +'args' => [] + }, + { +'return_type' => 'apr_array_header_t *', 'name' => 'ap_hook_get_log_transaction', 'args' => [] }, @@ -1954,6 +1959,28 @@ }, { 'return_type' => 'void', +'name' => 'ap_hook_install_transport_filters', +'args' => [ + { +'type' => 'ap_HOOK_install_transport_filters_t *', +'name' => 'pf' + }, + { +'type' => 'const char * const *', +'name' => 'aszPre' + }, + { +'type' => 'const char * const *', +'name' => 'aszSucc' + }, + { +'type' => 'int', +'name' => 'nOrder' + } +] + }, + { +'return_type' => 'void', 'name' => 'ap_hook_log_transaction', 'args' => [ { @@ -4121,6 +4148,20 @@ { 'type' => 'request_rec *', 'name' => 'r' + } +] + }, + { +'return_type' => 'int', +'name' => 'ap_run_install_transport_filters', +'args' => [ + { +'type' => 'conn_rec *', +'name' => 'c' + }, + { +'type' => 'apr_socket_t *', +'name' => 'csd' } ] }, 1.29 +34 -5 modperl-2.0/xs/tables/current/Apache/StructureTable.pm Index: StructureTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/StructureTable.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- StructureTable.pm 29 Jan 2002 05:35:34 - 1.28 +++ StructureTable.pm 30 Jan 2002 03:29:38 - 1.29 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Mon Jan 28 20:30:43 2002 +# ! Tue Jan 29 19:27:25 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -64,6 +64,10 @@ 'elts' => [] }, { +'type' => 'ap_HOOK_install_transport_filters_t', +'elts' => [] + }, + { 'type' => 'ap_HOOK_log_transaction_t', 'elts' => [] }, @@ -466,6 +470,31 @@ ] }, { +'type' => 'ap_LINK_install_transport_filters_t', +'elts' => [ + { +'type' => 'ap_HOOK_install_transport_filters_t *', +'name' => 'pFunc' + }, + { +'type' => 'const char *', +'name' => 'szName' + }, + { +'type' => 'const char * const *', +'name' => 'aszPredecessors' + }, + { +'type' => 'const char * const *', +'name' => 'aszSuccessors' + }, + { +'type' => 'int', +'name' => 'nOrder' + }
cvs commit: modperl-2.0/xs/Apache/Connection Apache__Connection.h
dougm 02/01/29 08:32:25 Modified:xs/Apache/Connection Apache__Connection.h Log: get Apache::Connection->client_socket working again Revision ChangesPath 1.2 +9 -0 modperl-2.0/xs/Apache/Connection/Apache__Connection.h Index: Apache__Connection.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/Connection/Apache__Connection.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Apache__Connection.h 19 Nov 2001 17:32:46 - 1.1 +++ Apache__Connection.h 29 Jan 2002 16:32:25 - 1.2 @@ -2,6 +2,8 @@ apr_socket_t *mpxs_Apache__Connection_client_socket(pTHX_ conn_rec *c, apr_socket_t *s) { +/* XXX: until minds are made up */ +#if 0 apr_socket_t *socket = ap_get_module_config(c->conn_config, &core_module); @@ -10,4 +12,11 @@ } return socket; +#else +if (s) { +c->client_socket = s; +} + +return c->client_socket; +#endif }
cvs commit: modperl-2.0/xs/tables/current/Apache FunctionTable.pm StructureTable.pm
dougm 02/01/28 21:35:34 Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm Log: sync Revision ChangesPath 1.32 +146 -59 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- FunctionTable.pm 25 Jan 2002 04:04:12 - 1.31 +++ FunctionTable.pm 29 Jan 2002 05:35:34 - 1.32 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Thu Jan 24 19:50:33 2002 +# ! Mon Jan 28 20:30:40 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -28,6 +28,20 @@ ] }, { +'return_type' => 'void', +'name' => 'ap_add_file_conf', +'args' => [ + { +'type' => 'core_dir_config *', +'name' => 'conf' + }, + { +'type' => 'void *', +'name' => 'url_config' + } +] + }, + { 'return_type' => 'ap_filter_t *', 'name' => 'ap_add_input_filter', 'args' => [ @@ -50,6 +64,28 @@ ] }, { +'return_type' => 'ap_filter_t *', +'name' => 'ap_add_input_filter_handle', +'args' => [ + { +'type' => 'ap_filter_rec_t *', +'name' => 'f' + }, + { +'type' => 'void *', +'name' => 'ctx' + }, + { +'type' => 'request_rec *', +'name' => 'r' + }, + { +'type' => 'conn_rec *', +'name' => 'c' + } +] + }, + { 'return_type' => 'void', 'name' => 'ap_add_loaded_module', 'args' => [ @@ -136,6 +172,56 @@ ] }, { +'return_type' => 'ap_filter_t *', +'name' => 'ap_add_output_filter_handle', +'args' => [ + { +'type' => 'ap_filter_rec_t *', +'name' => 'f' + }, + { +'type' => 'void *', +'name' => 'ctx' + }, + { +'type' => 'request_rec *', +'name' => 'r' + }, + { +'type' => 'conn_rec *', +'name' => 'c' + } +] + }, + { +'return_type' => 'void', +'name' => 'ap_add_per_dir_conf', +'args' => [ + { +'type' => 'server_rec *', +'name' => 's' + }, + { +'type' => 'void *', +'name' => 'dir_config' + } +] + }, + { +'return_type' => 'void', +'name' => 'ap_add_per_url_conf', +'args' => [ + { +'type' => 'server_rec *', +'name' => 's' + }, + { +'type' => 'void *', +'name' => 'url_config' + } +] + }, + { 'return_type' => 'void', 'name' => 'ap_add_version_component', 'args' => [ @@ -581,7 +667,7 @@ ] }, { -'return_type' => 'void', +'return_type' => 'int', 'name' => 'ap_create_scoreboard', 'args' => [ { @@ -1513,28 +1599,6 @@ }, { 'return_type' => 'void', -'name' => 'ap_hook_create_connection', -'args' => [ - { -'type' => 'ap_HOOK_create_connection_t *', -'name' => 'pf' - }, - { -'type' => 'const char * const *', -'name'
cvs commit: modperl-2.0/src/modules/perl modperl_util.c
dougm 02/01/28 20:49:37 Modified:src/modules/perl modperl_util.c Log: prevent segv in modperl_errsv() if ERRSV contains a '%' Revision ChangesPath 1.34 +2 -2 modperl-2.0/src/modules/perl/modperl_util.c Index: modperl_util.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- modperl_util.c8 Jan 2002 01:29:23 - 1.33 +++ modperl_util.c29 Jan 2002 04:49:37 - 1.34 @@ -252,10 +252,10 @@ } #endif if (r) { -ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, SvPV(sv, n_a)); +ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", SvPV(sv, n_a)); } else { -ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, SvPV(sv, n_a)); +ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "%s", SvPV(sv, n_a)); } return status;
cvs commit: modperl-2.0/xs/maps apache_functions.map
dougm 02/01/24 20:04:22 Modified:src/modules/perl modperl_filter.c modperl_filter.h xs/Apache/Filter Apache__Filter.h xs/maps apache_functions.map Log: adjust to ap_get_brigade() API change Revision ChangesPath 1.31 +3 -3 modperl-2.0/src/modules/perl/modperl_filter.c Index: modperl_filter.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- modperl_filter.c 20 Jan 2002 18:37:04 - 1.30 +++ modperl_filter.c 25 Jan 2002 04:04:22 - 1.31 @@ -116,7 +116,7 @@ int modperl_run_filter(modperl_filter_t *filter, ap_input_mode_t mode, apr_read_type_e block, - apr_off_t *readbytes) + apr_off_t readbytes) { AV *args = Nullav; int status; @@ -140,7 +140,7 @@ if (filter->mode == MP_INPUT_FILTER_MODE) { av_push(args, newSViv(mode)); av_push(args, newSViv(block)); -av_push(args, newSViv(*readbytes)); +av_push(args, newSViv(readbytes)); } if ((status = modperl_callback(aTHX_ handler, p, r, s, args)) != OK) { @@ -394,7 +394,7 @@ apr_bucket_brigade *bb, ap_input_mode_t mode, apr_read_type_e block, - apr_off_t *readbytes) + apr_off_t readbytes) { modperl_filter_t *filter; int status; 1.12 +2 -2 modperl-2.0/src/modules/perl/modperl_filter.h Index: modperl_filter.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- modperl_filter.h 20 Jan 2002 18:37:04 - 1.11 +++ modperl_filter.h 25 Jan 2002 04:04:22 - 1.12 @@ -28,7 +28,7 @@ int modperl_run_filter(modperl_filter_t *filter, ap_input_mode_t mode, apr_read_type_e block, - apr_off_t *readbytes); + apr_off_t readbytes); /* output filters */ apr_status_t modperl_output_filter_handler(ap_filter_t *f, @@ -56,7 +56,7 @@ apr_bucket_brigade *bb, ap_input_mode_t mode, apr_read_type_e block, - apr_off_t *readbytes); + apr_off_t readbytes); void modperl_input_filter_register_connection(conn_rec *c); 1.18 +0 -17 modperl-2.0/xs/Apache/Filter/Apache__Filter.h Index: Apache__Filter.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/Filter/Apache__Filter.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Apache__Filter.h 20 Jan 2002 18:37:05 - 1.17 +++ Apache__Filter.h 25 Jan 2002 04:04:22 - 1.18 @@ -60,23 +60,6 @@ return len; } -static apr_status_t mpxs_ap_get_brigade(pTHX_ ap_filter_t *filter, -apr_bucket_brigade *brigade, -ap_input_mode_t mode, -apr_read_type_e block, -SV *svreadbytes) -{ -apr_off_t readbytes = svreadbytes ? SvIV(svreadbytes) : 0; -apr_status_t status = ap_get_brigade(filter, brigade, - mode, block, &readbytes); - -if (svreadbytes) { -sv_setiv(svreadbytes, readbytes); -} - -return status; -} - static MP_INLINE U32 *modperl_filter_attributes(SV *package, SV *cvrv) { return (U32 *)&MP_CODE_ATTRS(SvRV(cvrv)); 1.43 +2 -2 modperl-2.0/xs/maps/apache_functions.map Index: apache_functions.map === RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- apache_functions.map 21 Jan 2002 08:27:30 - 1.42 +++ apache_functions.map 25 Jan 2002 04:04:22 - 1.43 @@ -203,10 +203,10 @@ PACKAGE=guess ~ap_add_output_filter ~ap_add_input_filter - ap_get_brigade | mpxs_ | \ + ap_get_brigade | | \ filter, bucket, mode=AP_MODE_READBYTES, \ block=APR
cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
dougm 02/01/24 20:04:12 Modified:xs/tables/current/Apache FunctionTable.pm xs/tables/current/ModPerl FunctionTable.pm Log: sync Revision ChangesPath 1.31 +72 -6 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- FunctionTable.pm 20 Jan 2002 18:35:26 - 1.30 +++ FunctionTable.pm 25 Jan 2002 04:04:12 - 1.31 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Sun Jan 20 10:18:13 2002 +# ! Thu Jan 24 19:50:33 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -1048,7 +1048,7 @@ 'name' => 'block' }, { -'type' => 'apr_off_t *', +'type' => 'apr_off_t', 'name' => 'readbytes' } ] @@ -,7 +,7 @@ 'name' => 'block' }, { -'type' => 'apr_off_t *', +'type' => 'apr_off_t', 'name' => 'readbytes' } ] @@ -3782,7 +3782,7 @@ ] }, { -'return_type' => 'int', +'return_type' => 'apr_status_t', 'name' => 'ap_rgetline', 'args' => [ { @@ -3790,10 +3790,14 @@ 'name' => 's' }, { -'type' => 'int', +'type' => 'apr_size_t', 'name' => 'n' }, { +'type' => 'apr_size_t *', +'name' => 'read' + }, + { 'type' => 'request_rec *', 'name' => 'r' }, @@ -5452,6 +5456,24 @@ }, { 'return_type' => 'apr_status_t', +'name' => 'apr_brigade_flatten', +'args' => [ + { +'type' => 'apr_bucket_brigade *', +'name' => 'bb' + }, + { +'type' => 'char *', +'name' => 'c' + }, + { +'type' => 'apr_off_t *', +'name' => 'len' + } +] + }, + { +'return_type' => 'apr_status_t', 'name' => 'apr_brigade_length', 'args' => [ { @@ -5488,6 +5510,28 @@ }, { 'return_type' => 'apr_status_t', +'name' => 'apr_brigade_pflatten', +'args' => [ + { +'type' => 'apr_bucket_brigade *', +'name' => 'bb' + }, + { +'type' => 'char **', +'name' => 'c' + }, + { +'type' => 'apr_off_t *', +'name' => 'len' + }, + { +'type' => 'apr_pool_t *', +'name' => 'pool' + } +] + }, + { +'return_type' => 'apr_status_t', 'name' => 'apr_brigade_printf', 'args' => [ { @@ -5594,6 +5638,28 @@ }, { 'return_type' => 'apr_status_t', +'name' => 'apr_brigade_split_line', +'args' => [ + { +'type' => 'apr_bucket_brigade *', +'name' => 'bbOut' + }, + { +'type' => 'apr_bucket_brigade *', +'name' => 'bbIn' + }, + { +'type' => 'apr_read_type_e', +'name' => 'block' + }, + { +'type' => 'apr_off_t', +'name' => 'maxbytes' + } +] + }, + { +'return_type' => 'apr_status_t', 'name' => 'apr_brigade_to_iovec', 'arg
cvs commit: modperl-2.0/xs/maps apache_functions.map
dougm 02/01/20 10:37:05 Modified:src/modules/perl modperl_filter.c modperl_filter.h t/filter/TestFilter input_body.pm input_msg.pm t/protocol/TestProtocol echo_filter.pm xs/Apache/Filter Apache__Filter.h xs/maps apache_functions.map Log: adjust to ap_get_brigade and input filter api changes Revision ChangesPath 1.30 +7 -3 modperl-2.0/src/modules/perl/modperl_filter.c Index: modperl_filter.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- modperl_filter.c 8 Jan 2002 00:04:33 - 1.29 +++ modperl_filter.c 20 Jan 2002 18:37:04 - 1.30 @@ -113,7 +113,9 @@ return mg ? (modperl_filter_t *)mg->mg_ptr : NULL; } -int modperl_run_filter(modperl_filter_t *filter, ap_input_mode_t mode, +int modperl_run_filter(modperl_filter_t *filter, + ap_input_mode_t mode, + apr_read_type_e block, apr_off_t *readbytes) { AV *args = Nullav; @@ -137,6 +139,7 @@ if (filter->mode == MP_INPUT_FILTER_MODE) { av_push(args, newSViv(mode)); +av_push(args, newSViv(block)); av_push(args, newSViv(*readbytes)); } @@ -374,7 +377,7 @@ } else { filter = modperl_filter_new(f, bb, MP_OUTPUT_FILTER_MODE); -status = modperl_run_filter(filter, 0, 0); +status = modperl_run_filter(filter, 0, 0, 0); } switch (status) { @@ -390,6 +393,7 @@ apr_status_t modperl_input_filter_handler(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode, + apr_read_type_e block, apr_off_t *readbytes) { modperl_filter_t *filter; @@ -402,7 +406,7 @@ } else { filter = modperl_filter_new(f, bb, MP_INPUT_FILTER_MODE); -status = modperl_run_filter(filter, mode, readbytes); +status = modperl_run_filter(filter, mode, block, readbytes); } switch (status) { 1.11 +4 -1 modperl-2.0/src/modules/perl/modperl_filter.h Index: modperl_filter.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- modperl_filter.h 9 Aug 2001 16:52:51 - 1.10 +++ modperl_filter.h 20 Jan 2002 18:37:04 - 1.11 @@ -25,7 +25,9 @@ modperl_filter_t *modperl_filter_mg_get(pTHX_ SV *obj); -int modperl_run_filter(modperl_filter_t *filter, ap_input_mode_t mode, +int modperl_run_filter(modperl_filter_t *filter, + ap_input_mode_t mode, + apr_read_type_e block, apr_off_t *readbytes); /* output filters */ @@ -53,6 +55,7 @@ apr_status_t modperl_input_filter_handler(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode, + apr_read_type_e block, apr_off_t *readbytes); void modperl_input_filter_register_connection(conn_rec *c); 1.9 +2 -2 modperl-2.0/t/filter/TestFilter/input_body.pm Index: input_body.pm === RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/input_body.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- input_body.pm 21 Dec 2001 11:30:38 - 1.8 +++ input_body.pm 20 Jan 2002 18:37:05 - 1.9 @@ -11,11 +11,11 @@ use APR::Bucket (); sub handler : FilterRequestHandler { -my($filter, $bb, $mode, $readbytes) = @_; +my($filter, $bb, $mode, $block, $readbytes) = @_; my $ctx_bb = APR::Brigade->new($filter->r->pool); -my $rv = $filter->next->get_brigade($ctx_bb, $mode, $readbytes); +my $rv = $filter->next->get_brigade($ctx_bb, $mode, $block, $readbytes); if ($rv != APR::SUCCESS) { return $rv; 1.9 +2 -2 modperl-2.0/t/filter/TestFilter/input_msg.pm Index: input_msg.pm === RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/input_msg.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- input_msg.pm 21 Dec 2001 11:30:38 - 1.8 +++ input_msg.pm 20 Jan 2
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 02/01/20 10:36:08 Modified:lib/Apache ParseSource.pm Log: skip parsing of apr_{anylock,rmm}.h for the moment (C::Scan chokes) Revision ChangesPath 1.34 +1 -1 modperl-2.0/lib/Apache/ParseSource.pm Index: ParseSource.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- ParseSource.pm31 Dec 2001 12:11:48 - 1.33 +++ ParseSource.pm20 Jan 2002 18:36:07 - 1.34 @@ -94,7 +94,7 @@ my @includes; my $unwanted = join '|', qw(ap_listen internal version apr_optional mod_include mod_cgi mod_proxy -mod_ssl ssl_); +mod_ssl ssl_ apr_anylock apr_rmm); for my $dir (@dirs) { File::Find::finddepth({
cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm
dougm 02/01/20 10:35:26 Modified:xs/tables/current/Apache ConstantsTable.pm FunctionTable.pm StructureTable.pm xs/tables/current/ModPerl FunctionTable.pm Log: sync Revision ChangesPath 1.21 +6 -4 modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm Index: ConstantsTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/ConstantsTable.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ConstantsTable.pm 31 Dec 2001 12:16:37 - 1.20 +++ ConstantsTable.pm 20 Jan 2002 18:35:26 - 1.21 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Mon Dec 31 20:02:32 2001 +# ! Sun Jan 20 10:13:22 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -76,9 +76,11 @@ 'APLOG_STARTUP' ], 'input_mode' => [ - 'AP_MODE_BLOCKING', - 'AP_MODE_NONBLOCKING', - 'AP_MODE_PEEK', + 'AP_MODE_READBYTES', + 'AP_MODE_GETLINE', + 'AP_MODE_EATCRLF', + 'AP_MODE_SPECULATIVE', + 'AP_MODE_EXHAUSTIVE', 'AP_MODE_INIT' ], 'http' => [ 1.30 +183 -521 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm Index: FunctionTable.pm === RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- FunctionTable.pm 31 Dec 2001 12:16:37 - 1.29 +++ FunctionTable.pm 20 Jan 2002 18:35:26 - 1.30 @@ -2,7 +2,7 @@ # !! # ! WARNING: generated by Apache::ParseSource/0.02 -# ! Mon Dec 31 19:58:28 2001 +# ! Sun Jan 20 10:18:13 2002 # ! do NOT edit, any changes will be lost ! # !! @@ -563,8 +563,8 @@ 'name' => 'ap_create_sb_handle', 'args' => [ { -'type' => 'void **', -'name' => 'new_handle' +'type' => 'ap_sb_handle_t **', +'name' => 'new_sbh' }, { 'type' => 'apr_pool_t *', @@ -1044,6 +1044,10 @@ 'name' => 'mode' }, { +'type' => 'apr_read_type_e', +'name' => 'block' + }, + { 'type' => 'apr_off_t *', 'name' => 'readbytes' } @@ -1068,12 +1072,7 @@ ] }, { -'return_type' => 'global_score *', -'name' => 'ap_get_global_scoreboard', -'args' => [] - }, - { -'return_type' => 'unsigned long', +'return_type' => 'apr_off_t', 'name' => 'ap_get_limit_req_body', 'args' => [ { @@ -1117,16 +1116,6 @@ ] }, { -'return_type' => 'process_score *', -'name' => 'ap_get_parent_scoreboard', -'args' => [ - { -'type' => 'int', -'name' => 'x' - } -] - }, - { 'return_type' => 'const char *', 'name' => 'ap_get_remote_host', 'args' => [ @@ -1159,6 +1148,49 @@ ] }, { +'return_type' => 'void **', +'name' => 'ap_get_request_note', +'args' => [ + { +'type' => 'request_rec *', +'name' => 'r' + }, + { +'type' => 'apr_size_t', +'name' => 'note_num' + } +] + }, + { +'return_type' => 'global_score *', +'name' => 'ap_get_scoreboard_global', +'args' => [] + }, + { +'return_type' => 'process_score *', +'name' => 'ap_get_scoreboard_process', +'args' => [ + { +'type' => &
cvs commit: modperl-2.0/xs/Apache/SubProcess Apache__SubProcess.h
dougm 02/01/18 16:25:41 Modified:xs/Apache/SubProcess Apache__SubProcess.h Log: get rid of warning on win32 - FAILED : macro redefinition Revision ChangesPath 1.9 +1 -0 modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h Index: Apache__SubProcess.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/SubProcess/Apache__SubProcess.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Apache__SubProcess.h 18 Dec 2001 05:44:16 - 1.8 +++ Apache__SubProcess.h 19 Jan 2002 00:25:41 - 1.9 @@ -15,6 +15,7 @@ apr_cmdtype_e cmd_type; } exec_info; +#undef FAILED /* win32 defines a macro with this name */ #define FAILED(command) ((rc = command) != APR_SUCCESS) #define SET_TIMEOUT(fp) \
cvs commit: modperl-2.0/t/protocol/TestProtocol eliza.pm
dougm 02/01/10 09:26:20 Modified:t/protocol/TestProtocol eliza.pm Log: chomp the string before testing value Revision ChangesPath 1.2 +1 -0 modperl-2.0/t/protocol/TestProtocol/eliza.pm Index: eliza.pm === RCS file: /home/cvs/modperl-2.0/t/protocol/TestProtocol/eliza.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- eliza.pm 6 Sep 2001 02:45:13 - 1.1 +++ eliza.pm 10 Jan 2002 17:26:20 - 1.2 @@ -19,6 +19,7 @@ my $rlen = BUFF_LEN; $socket->recv($buff, $rlen); last if $rlen <= 0; +chomp $buff; $last++ if $buff eq 'good bye'; $buff = $mybot->transform( $buff ) . "\n"; $socket->send($buff, length $buff);
cvs commit: modperl-2.0/src/modules/perl mod_perl.c
dougm 02/01/08 16:31:39 Modified:src/modules/perl mod_perl.c Log: rid warning #ifdef USE_ITHREADS Revision ChangesPath 1.104 +1 -1 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- mod_perl.c8 Jan 2002 01:13:28 - 1.103 +++ mod_perl.c9 Jan 2002 00:31:39 - 1.104 @@ -640,10 +640,10 @@ int modperl_response_handler_cgi(request_rec *r) { MP_dDCFG; -MP_dRCFG; GV *h_stdin, *h_stdout; int retval; #ifdef USE_ITHREADS +MP_dRCFG; pTHX; modperl_interp_t *interp; #endif
cvs commit: modperl-2.0/t/response/TestModperl readline.pm getc.pm
dougm 02/01/08 14:49:32 Modified:t/response/TestModperl readline.pm getc.pm Log: untie STDIN Revision ChangesPath 1.3 +2 -0 modperl-2.0/t/response/TestModperl/readline.pm Index: readline.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/readline.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- readline.pm 5 Dec 2001 05:48:39 - 1.2 +++ readline.pm 8 Jan 2002 22:49:32 - 1.3 @@ -16,6 +16,8 @@ $r->puts($line); } +untie *STDIN; + Apache::OK; } 1.3 +2 -0 modperl-2.0/t/response/TestModperl/getc.pm Index: getc.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/getc.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- getc.pm 7 Dec 2001 04:47:13 - 1.2 +++ getc.pm 8 Jan 2002 22:49:32 - 1.3 @@ -16,6 +16,8 @@ $r->puts($c); } +untie *STDIN; + Apache::OK; }
cvs commit: modperl-2.0/xs/maps modperl_functions.map
dougm 02/01/08 14:48:38 Modified:xs/Apache/RequestIO Apache__RequestIO.h xs/maps modperl_functions.map Log: dd UNTIE method to avoid warning from pp_untie: "untie attempted while %d inner references still exist" which is legit in our case, since we do not create a new object in TIEHANDLE, but rather increment the refcount of and existing one. Revision ChangesPath 1.25 +3 -0 modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h Index: Apache__RequestIO.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Apache__RequestIO.h 6 Jan 2002 20:45:36 - 1.24 +++ Apache__RequestIO.h 8 Jan 2002 22:48:38 - 1.25 @@ -6,6 +6,9 @@ #define mpxs_Apache__RequestRec_BINMODE(r) \ r ? &PL_sv_yes : &PL_sv_no /* noop */ +#define mpxs_Apache__RequestRec_UNTIE(r, refcnt) \ +(r && refcnt) ? &PL_sv_yes : &PL_sv_no /* noop */ + #define mpxs_output_flush(r, rcfg) \ /* if ($|) */ \ if (IoFLUSH(PL_defoutgv)) { \ 1.32 +1 -0 modperl-2.0/xs/maps/modperl_functions.map Index: modperl_functions.map === RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- modperl_functions.map 20 Dec 2001 18:12:16 - 1.31 +++ modperl_functions.map 8 Jan 2002 22:48:38 - 1.32 @@ -30,6 +30,7 @@ apr_size_t:DEFINE_PRINT | | ... apr_size_t:DEFINE_PRINTF | | ... SV *:DEFINE_BINMODE | | request_rec *:r + SV *:DEFINE_UNTIE| | request_rec *:r, int:refcnt mpxs_Apache__RequestRec_sendfile | | r, filename=r->filename, offset=0, len=0 mpxs_Apache__RequestRec_read | | r, buffer, bufsiz, offset=0 long:DEFINE_READ | | request_rec *:r, SV *:buffer, int:bufsiz, int:offset=0
cvs commit: modperl-2.0/t/response/TestModperl print.pm
dougm 02/01/08 14:46:09 Modified:t/conf modperl_extra.pl t/response/TestModperl print.pm Log: add some END blocks for testing Revision ChangesPath 1.12 +4 -0 modperl-2.0/t/conf/modperl_extra.pl Index: modperl_extra.pl === RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- modperl_extra.pl 22 Dec 2001 18:59:52 - 1.11 +++ modperl_extra.pl 8 Jan 2002 22:46:08 - 1.12 @@ -53,4 +53,8 @@ return $buf; } +END { +warn "END in modperl_extra.pl, pid=$$\n"; +} + 1; 1.4 +5 -0 modperl-2.0/t/response/TestModperl/print.pm Index: print.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/print.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- print.pm 1 Jan 2002 10:36:05 - 1.3 +++ print.pm 8 Jan 2002 22:46:09 - 1.4 @@ -21,4 +21,9 @@ Apache::OK; } +END { +my $package = __PACKAGE__; +warn "END in $package, pid=$$\n"; +} + 1;
cvs commit: modperl-2.0/src/modules/perl modperl_io.c
dougm 02/01/08 11:04:22 Modified:src/modules/perl modperl_io.c Log: plug leaking tied STD{IN,OUT} objects Revision ChangesPath 1.6 +2 -0 modperl-2.0/src/modules/perl/modperl_io.c Index: modperl_io.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- modperl_io.c 6 Jan 2002 21:56:22 - 1.5 +++ modperl_io.c 8 Jan 2002 19:04:22 - 1.6 @@ -42,6 +42,8 @@ sv_magic((SV*)handle, obj, 'q', Nullch, 0); sv_magic((SV*)GvIOp(handle), obj, 'q', Nullch, 0); +SvREFCNT_dec(obj); /* since sv_magic did SvREFCNT_inc */ + MP_TRACE_g(MP_FUNC, "tie *%s(0x%lx) => %s, REFCNT=%d\n", GvNAME(handle), (unsigned long)handle, classname, SvREFCNT((SV*)handle));
cvs commit: modperl-2.0/src/modules/perl modperl_util.c
dougm 02/01/07 17:29:23 Modified:src/modules/perl modperl_util.c Log: plug leaking Apache::Table objects Revision ChangesPath 1.33 +1 -1 modperl-2.0/src/modules/perl/modperl_util.c Index: modperl_util.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- modperl_util.c14 Dec 2001 04:35:28 - 1.32 +++ modperl_util.c8 Jan 2002 01:29:23 - 1.33 @@ -367,7 +367,7 @@ SV *tsv, void *p) { SV *hv = (SV*)newHV(); -SV *rsv = newSViv(0); +SV *rsv = sv_newmortal(); sv_setref_pv(rsv, classname, p); sv_magic(hv, rsv, PERL_MAGIC_tied, Nullch, 0);
cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h modperl_interp.c
dougm 02/01/07 17:13:29 Modified:src/modules/perl mod_perl.c mod_perl.h modperl_interp.c Log: fix so perl_destruct (and things like END blocks) are run in child processes when they are shutdown Revision ChangesPath 1.103 +30 -3 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -r1.102 -r1.103 --- mod_perl.c6 Jan 2002 21:39:36 - 1.102 +++ mod_perl.c8 Jan 2002 01:13:28 - 1.103 @@ -128,6 +128,20 @@ SAVEDESTRUCTOR_X(modperl_boot, 0); } +/* + * the "server_pool" is a subpool of the parent pool (aka "pconf") + * this is where we register the cleanups that teardown the interpreter. + * the parent process will run the cleanups since server_pool is a subpool + * of pconf. we manually clear the server_pool to run cleanups in the + * child processes + */ +static apr_pool_t *server_pool = NULL; + +apr_pool_t *modperl_server_pool(void) +{ +return server_pool; +} + PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p) { AV *endav; @@ -198,8 +212,8 @@ } #ifndef USE_ITHREADS -cdata = modperl_cleanup_data_new(p, (void*)perl); -apr_pool_cleanup_register(p, cdata, +cdata = modperl_cleanup_data_new(server_pool, (void*)perl); +apr_pool_cleanup_register(server_pool, cdata, modperl_shutdown, apr_pool_cleanup_null); #endif @@ -380,8 +394,10 @@ int modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { +apr_pool_create(&server_pool, pconf); + modperl_sys_init(); -apr_pool_cleanup_register(pconf, NULL, +apr_pool_cleanup_register(server_pool, NULL, modperl_sys_term, apr_pool_cleanup_null); modperl_init_globals(s, pconf); modperl_init(s, pconf); @@ -461,9 +477,20 @@ return OK; } +static apr_status_t modperl_child_exit(void *data) +{ +apr_pool_clear(server_pool); +server_pool = NULL; + +return APR_SUCCESS; +} + static void modperl_hook_child_init(apr_pool_t *p, server_rec *s) { modperl_perl_init_ids_server(s); + +apr_pool_cleanup_register(p, NULL, modperl_child_exit, + apr_pool_cleanup_null); } void modperl_register_hooks(apr_pool_t *p) 1.40 +1 -0 modperl-2.0/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- mod_perl.h24 Nov 2001 01:15:01 - 1.39 +++ mod_perl.h8 Jan 2002 01:13:28 - 1.40 @@ -45,6 +45,7 @@ void modperl_pre_config_handler(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp); void modperl_register_hooks(apr_pool_t *p); +apr_pool_t *modperl_server_pool(void); PerlInterpreter *modperl_startup(server_rec *s, apr_pool_t *p); void xs_init(pTHXo); 1.39 +2 -1 modperl-2.0/src/modules/perl/modperl_interp.c Index: modperl_interp.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- modperl_interp.c 5 Nov 2001 05:19:01 - 1.38 +++ modperl_interp.c 8 Jan 2002 01:13:28 - 1.39 @@ -191,6 +191,7 @@ void modperl_interp_init(server_rec *s, apr_pool_t *p, PerlInterpreter *perl) { +apr_pool_t *server_pool = modperl_server_pool(); pTHX; MP_dSCFG(s); @@ -210,7 +211,7 @@ /* this happens post-config in mod_perl.c:modperl_init_clones() */ /* modperl_tipool_init(tipool); */ -apr_pool_cleanup_register(p, (void*)mip, +apr_pool_cleanup_register(server_pool, (void*)mip, modperl_interp_pool_destroy, apr_pool_cleanup_null);
cvs commit: modperl-2.0/xs/APR/PerlIO apr_perlio.c
dougm 02/01/07 17:09:19 Modified:xs/APR/PerlIO apr_perlio.c Log: work around bug where some PerlIOAPR filehandles are still open during perl_destruct Revision ChangesPath 1.10 +14 -2 modperl-2.0/xs/APR/PerlIO/apr_perlio.c Index: apr_perlio.c === RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- apr_perlio.c 8 Jan 2002 01:06:20 - 1.9 +++ apr_perlio.c 8 Jan 2002 01:09:19 - 1.10 @@ -206,14 +206,26 @@ IV code = PerlIOBase_close(aTHX_ f); apr_status_t rc; +#ifdef PERLIO_APR_DEBUG const char *new_path = NULL; -apr_file_name_get(&new_path, st->file); +if (!PL_dirty) { +/* if this is called during perl_destruct we are in trouble */ +apr_file_name_get(&new_path, st->file); +} -#ifdef PERLIO_APR_DEBUG Perl_warn(aTHX_ "PerlIOAPR_close obj=0x%lx, file=0x%lx, name=%s\n", (unsigned long)f, (unsigned long)st->file, new_path ? new_path : "(UNKNOWN)"); #endif + +if (PL_dirty) { +/* there should not be any PerlIOAPR handles open + * during perl_destruct + */ +Perl_warn(aTHX_ "leaked PerlIOAPR handle 0x%lx", + (unsigned long)f); +return -1; +} rc = apr_file_flush(st->file); if (rc != APR_SUCCESS) {
cvs commit: modperl-2.0/xs/APR/PerlIO apr_perlio.c
dougm 02/01/07 17:06:20 Modified:xs/APR/PerlIO apr_perlio.c Log: add some debug info Revision ChangesPath 1.9 +23 -2 modperl-2.0/xs/APR/PerlIO/apr_perlio.c Index: apr_perlio.c === RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- apr_perlio.c 4 Jan 2002 09:29:50 - 1.8 +++ apr_perlio.c 8 Jan 2002 01:06:20 - 1.9 @@ -82,6 +82,13 @@ st->pool = modperl_sv2pool(aTHX_ sv); rc = apr_file_open(&st->file, path, apr_flag, APR_OS_DEFAULT, st->pool); + +#ifdef PERLIO_APR_DEBUG +Perl_warn(aTHX_ "PerlIOAPR_open obj=0x%lx, file=0x%lx, name=%s, rc=%d\n", + (unsigned long)f, (unsigned long)st->file, + path ? path : "(UNKNOWN)", rc); +#endif + if (rc != APR_SUCCESS) { PerlIOBase(f)->flags |= PERLIO_F_ERROR; return NULL; @@ -110,6 +117,15 @@ PerlIOAPR *ost = PerlIOSelf(o, PerlIOAPR); rc = apr_file_dup(&fst->file, ost->file, ost->pool); + +#ifdef PERLIO_APR_DEBUG +Perl_warn(aTHX_ "PerlIOAPR_dup obj=0x%lx, " +"file=0x%lx => 0x%lx, rc=%d\n", + (unsigned long)f, + (unsigned long)ost->file, + (unsigned long)fst->file, rc); +#endif + if (rc == APR_SUCCESS) { fst->pool = ost->pool; return f; @@ -190,9 +206,14 @@ IV code = PerlIOBase_close(aTHX_ f); apr_status_t rc; -const char *new_path; +const char *new_path = NULL; apr_file_name_get(&new_path, st->file); -/* Perl_warn(aTHX_ "closing file %s\n", new_path); */ + +#ifdef PERLIO_APR_DEBUG +Perl_warn(aTHX_ "PerlIOAPR_close obj=0x%lx, file=0x%lx, name=%s\n", + (unsigned long)f, (unsigned long)st->file, + new_path ? new_path : "(UNKNOWN)"); +#endif rc = apr_file_flush(st->file); if (rc != APR_SUCCESS) {
cvs commit: modperl-2.0/src/modules/perl modperl_filter.c
dougm 02/01/07 16:04:33 Modified:src/modules/perl modperl_filter.c Log: fix leak where Apache::Filter objects needlessly contained a reference loop Revision ChangesPath 1.29 +1 -1 modperl-2.0/src/modules/perl/modperl_filter.c Index: modperl_filter.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_filter.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- modperl_filter.c 21 Oct 2001 22:11:34 - 1.28 +++ modperl_filter.c 8 Jan 2002 00:04:33 - 1.29 @@ -103,7 +103,7 @@ static void modperl_filter_mg_set(pTHX_ SV *obj, modperl_filter_t *filter) { -sv_magic(SvRV(obj), obj, '~', NULL, 0); +sv_magic(SvRV(obj), Nullsv, '~', NULL, -1); SvMAGIC(SvRV(obj))->mg_ptr = (char *)filter; }
cvs commit: modperl-2.0/xs/Apache/Response Apache__Response.h
dougm 02/01/06 14:23:24 Modified:xs/Apache/Response Apache__Response.h Log: rcfg->wbucket is now a pointer Revision ChangesPath 1.5 +2 -2 modperl-2.0/xs/Apache/Response/Apache__Response.h Index: Apache__Response.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/Response/Apache__Response.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Apache__Response.h13 Sep 2001 04:41:44 - 1.4 +++ Apache__Response.h6 Jan 2002 22:23:24 - 1.5 @@ -10,7 +10,7 @@ STRLEN len; \ const char *bodytext; \ modperl_cgi_header_parse(r, SvPV(sv,len), &bodytext); \ -rcfg->wbucket.header_parse = 0; \ +rcfg->wbucket->header_parse = 0; \ } /* XXX: should only be part of Apache::compat */ @@ -23,5 +23,5 @@ r->content_type = apr_pstrdup(r->pool, type); } -rcfg->wbucket.header_parse = 0; /* turn off PerlOptions +ParseHeaders */ +rcfg->wbucket->header_parse = 0; /* turn off PerlOptions +ParseHeaders */ }
cvs commit: modperl-2.0/src/modules/perl modperl_io.c
dougm 02/01/06 13:56:22 Modified:src/modules/perl modperl_io.c Log: always call modperl_io_handle_untie() in modperl_io_handle_tie() fixes a segv in modules/cgi test #1 Revision ChangesPath 1.5 +14 -7 modperl-2.0/src/modules/perl/modperl_io.c Index: modperl_io.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_io.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- modperl_io.c 13 Sep 2001 04:10:55 - 1.4 +++ modperl_io.c 6 Jan 2002 21:56:22 - 1.5 @@ -15,12 +15,21 @@ */ MP_INLINE void modperl_io_handle_untie(pTHX_ GV *handle) { +#ifdef MP_TRACE +if (mg_find((SV*)handle, 'q') || +mg_find((SV*)GvIOp(handle), 'q')) +{ +MP_TRACE_g(MP_FUNC, "untie *%s(0x%lx), REFCNT=%d\n", + GvNAME(handle), (unsigned long)handle, + SvREFCNT((SV*)handle)); +} +else { +return; +} +#endif + sv_unmagic((SV*)handle, 'q'); sv_unmagic((SV*)GvIOp(handle), 'q'); - -MP_TRACE_g(MP_FUNC, "untie *%s(0x%lx), REFCNT=%d\n", - GvNAME(handle), (unsigned long)handle, - SvREFCNT((SV*)handle)); } MP_INLINE void modperl_io_handle_tie(pTHX_ GV *handle, @@ -28,9 +37,7 @@ { SV *obj = modperl_ptr2obj(aTHX_ classname, ptr); -if (mg_find((SV*)handle, 'q')) { -modperl_io_handle_untie(aTHX_ handle); -} +modperl_io_handle_untie(aTHX_ handle); sv_magic((SV*)handle, obj, 'q', Nullch, 0); sv_magic((SV*)GvIOp(handle), obj, 'q', Nullch, 0);
cvs commit: modperl-2.0/src/modules/perl mod_perl.c
dougm 02/01/06 13:39:36 Modified:src/modules/perl mod_perl.c Log: only tie/untie STD{OUT,IN} and %ENV in the main request Revision ChangesPath 1.102 +10 -6 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -r1.101 -r1.102 --- mod_perl.c6 Jan 2002 20:45:35 - 1.101 +++ mod_perl.c6 Jan 2002 21:39:36 - 1.102 @@ -640,17 +640,21 @@ modperl_env_request_populate(aTHX_ r); } -h_stdout = modperl_io_tie_stdout(aTHX_ r); -h_stdin = modperl_io_tie_stdin(aTHX_ r); +if (!r->main) { +h_stdout = modperl_io_tie_stdout(aTHX_ r); +h_stdin = modperl_io_tie_stdin(aTHX_ r); -modperl_env_request_tie(aTHX_ r); +modperl_env_request_tie(aTHX_ r); +} retval = modperl_response_handler_run(r, FALSE); -modperl_io_handle_untie(aTHX_ h_stdout); -modperl_io_handle_untie(aTHX_ h_stdin); +if (!r->main) { +modperl_io_handle_untie(aTHX_ h_stdout); +modperl_io_handle_untie(aTHX_ h_stdin); -modperl_env_request_untie(aTHX_ r); +modperl_env_request_untie(aTHX_ r); +} modperl_perl_global_request_restore(aTHX_ r);
cvs commit: modperl-2.0/xs/Apache/RequestIO Apache__RequestIO.h
dougm 02/01/06 12:45:36 Modified:src/modules/perl mod_perl.c modperl_config.c modperl_types.h xs/Apache/RequestIO Apache__RequestIO.h Log: share output buffer (modperl_wbucket_t) across subrequests Revision ChangesPath 1.101 +19 -9 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -r1.100 -r1.101 --- mod_perl.c23 Dec 2001 05:46:29 - 1.100 +++ mod_perl.c6 Jan 2002 20:45:35 - 1.101 @@ -433,7 +433,13 @@ if (r->main) { modperl_config_req_t *main_rcfg = modperl_config_req_get(r->main); -modperl_wbucket_flush(&main_rcfg->wbucket); + +rcfg->wbucket = main_rcfg->wbucket; +} +else { +rcfg->wbucket = +(modperl_wbucket_t *)apr_palloc(r->pool, +sizeof(*rcfg->wbucket)); } return OK; @@ -553,11 +559,19 @@ void modperl_response_init(request_rec *r) { MP_dRCFG; +MP_dDCFG; +modperl_wbucket_t *wb = rcfg->wbucket; + +if (r->main) { +return; +} /* setup buffer for output */ -rcfg->wbucket.pool = r->pool; -rcfg->wbucket.filters = &r->output_filters; -rcfg->wbucket.outcnt = 0; +wb->pool = r->pool; +wb->filters = &r->output_filters; +wb->outcnt = 0; +wb->header_parse = MpDirPARSE_HEADERS(dcfg) ? 1 : 0; +wb->r = r; } void modperl_response_finish(request_rec *r) @@ -565,7 +579,7 @@ MP_dRCFG; /* flush output buffer */ -modperl_wbucket_flush(&rcfg->wbucket); +modperl_wbucket_flush(rcfg->wbucket); } static int modperl_response_handler_run(request_rec *r, int finish) @@ -624,10 +638,6 @@ /* default is +SetupEnv, skip if PerlOption -SetupEnv */ if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) { modperl_env_request_populate(aTHX_ r); -} - -if (MpDirPARSE_HEADERS(dcfg)) { -rcfg->wbucket.header_parse = 1; } h_stdout = modperl_io_tie_stdout(aTHX_ r); 1.52 +0 -2 modperl-2.0/src/modules/perl/modperl_config.c Index: modperl_config.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- modperl_config.c 20 Nov 2001 02:39:02 - 1.51 +++ modperl_config.c 6 Jan 2002 20:45:36 - 1.52 @@ -88,8 +88,6 @@ modperl_config_req_t *rcfg = (modperl_config_req_t *)apr_pcalloc(r->pool, sizeof(*rcfg)); -rcfg->wbucket.r = r; - MP_TRACE_d(MP_FUNC, "0x%lx\n", (unsigned long)rcfg); return rcfg; 1.55 +1 -1 modperl-2.0/src/modules/perl/modperl_types.h Index: modperl_types.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- modperl_types.h 19 Nov 2001 00:07:28 - 1.54 +++ modperl_types.h 6 Jan 2002 20:45:36 - 1.55 @@ -205,7 +205,7 @@ HV *pnotes; SV *global_request_obj; U8 flags; -modperl_wbucket_t wbucket; +modperl_wbucket_t *wbucket; MpAV *handlers_per_dir[MP_HANDLER_NUM_PER_DIR]; MpAV *handlers_per_srv[MP_HANDLER_NUM_PER_SRV]; modperl_perl_globals_t perl_globals; 1.24 +5 -5 modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h Index: Apache__RequestIO.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Apache__RequestIO.h 20 Dec 2001 18:12:15 - 1.23 +++ Apache__RequestIO.h 6 Jan 2002 20:45:36 - 1.24 @@ -9,7 +9,7 @@ #define mpxs_output_flush(r, rcfg) \ /* if ($|) */ \ if (IoFLUSH(PL_defoutgv)) { \ -modperl_wbucket_flush(&rcfg->wbucket); \ +modperl_wbucket_flush(rcfg->wbucket); \ ap_rflush(r); \ } @@ -27,7 +27,7 @@ MP_START_TIMES(); -mpxs_write_loop(modperl_wbucket_write, &rcfg->wbucket); +mpxs_write_loop(modperl_wbucket_write, rcfg->wbucket); MP_END_TIMES(); MP_PRINT_TIMES("r->puts"); @@ -54,7 +54,7 @@ rcfg = modperl_config_re
cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_perl_includes.h
dougm 01/12/22 21:46:29 Modified:src/modules/perl mod_perl.c modperl_perl_includes.h Log: nasty workaround for bug fixed in bleedperl (11536 + 11553) in $foo = \*STDOUT; where the reference would get a copy of STDOUT without the tie magic. (recentish changes that re-tied STDOUT every request uncovered an instance of the bug during 'make test') Revision ChangesPath 1.100 +55 -0 modperl-2.0/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- mod_perl.c2001/12/11 23:20:34 1.99 +++ mod_perl.c2001/12/23 05:46:29 1.100 @@ -42,12 +42,67 @@ apr_pool_t *p = MP_boot_data.p; \ server_rec *s = MP_boot_data.s +#if defined(USE_ITHREADS) && defined(MP_PERL_5_6_1) +# define MP_REFGEN_FIXUP +#endif + +#ifdef MP_REFGEN_FIXUP + +/* + * nasty workaround for bug fixed in bleedperl (11536 + 11553) + * XXX: when 5.8.0 is released + stable, we will require 5.8.0 + * if ithreads are enabled. + */ +static OP * (*MP_pp_srefgen_ptr)(pTHX) = NULL; + +static OP *modperl_pp_srefgen(pTHX) +{ +dSP; +OP *o; +SV *sv = *SP; + +if (SvPADTMP(sv) && IS_PADGV(sv)) { +/* prevent S_refto from making a copy of the GV, + * tricking it to SvREFCNT_inc and point to this one instead. + */ +SvPADTMP_off(sv); +} +else { +sv = Nullsv; +} + +/* o = Perl_pp_srefgen(aTHX) */ +o = MP_pp_srefgen_ptr(aTHX); + +if (sv) { +/* restore original flags */ +SvPADTMP_on(sv); +} + +return o; +} + +static void modperl_refgen_ops_fixup(void) +{ +/* XXX: OP_REFGEN suffers a similar problem */ +if (!MP_pp_srefgen_ptr) { +MP_pp_srefgen_ptr = PL_ppaddr[OP_SREFGEN]; +PL_ppaddr[OP_SREFGEN] = MEMBER_TO_FPTR(modperl_pp_srefgen); +} +} + +#endif /* MP_REFGEN_FIXUP */ + static void modperl_boot(void *data) { MP_dBOOT_DATA; dTHX; /* XXX: not too worried since this only happens at startup */ int i; +#ifdef MP_REFGEN_FIXUP +modperl_refgen_ops_fixup(); +#endif + modperl_env_clear(aTHX); modperl_env_default_populate(aTHX); 1.9 +4 -0 modperl-2.0/src/modules/perl/modperl_perl_includes.h Index: modperl_perl_includes.h === RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_includes.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- modperl_perl_includes.h 2001/11/07 03:14:54 1.8 +++ modperl_perl_includes.h 2001/12/23 05:46:29 1.9 @@ -35,6 +35,10 @@ #include "perl.h" #include "XSUB.h" +#if (PERL_REVISION == 5) && (PERL_VERSION == 6) && (PERL_SUBVERSION == 1) +# define MP_PERL_5_6_1 +#endif + #ifdef PERL_CORE # ifndef croak # define croak Perl_croak_nocontext
cvs commit: modperl-2.0/t/conf modperl_extra.pl
dougm 01/12/22 10:59:52 Modified:t/conf modperl_extra.pl Log: use ModPerl::Util for the CORE::GLOBAL::exit hook Revision ChangesPath 1.11 +2 -0 modperl-2.0/t/conf/modperl_extra.pl Index: modperl_extra.pl === RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- modperl_extra.pl 2001/11/15 03:02:43 1.10 +++ modperl_extra.pl 2001/12/22 18:59:52 1.11 @@ -1,3 +1,5 @@ +use ModPerl::Util (); #for CORE::GLOBAL::exit + use Apache::RequestRec (); use Apache::RequestIO (); use Apache::RequestUtil ();
cvs commit: modperl-2.0/xs/maps modperl_functions.map
dougm 01/12/20 10:12:16 Modified:t/response/TestModperl print.pm todo api.txt xs/Apache/RequestIO Apache__RequestIO.h xs/maps modperl_functions.map Log: add Apache::RequestRec::BINMODE method Revision ChangesPath 1.2 +2 -0 modperl-2.0/t/response/TestModperl/print.pm Index: print.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/print.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- print.pm 2001/11/06 18:50:25 1.1 +++ print.pm 2001/12/20 18:12:15 1.2 @@ -10,6 +10,8 @@ plan $r, tests => 3; +binmode STDOUT; #Apache::RequestRec::BINMODE (noop) + ok 1; ok 2; 1.18 +1 -1 modperl-2.0/todo/api.txt Index: api.txt === RCS file: /home/cvs/modperl-2.0/todo/api.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- api.txt 2001/12/14 04:52:45 1.17 +++ api.txt 2001/12/20 18:12:15 1.18 @@ -3,7 +3,7 @@ -- tied filehandle interface: - -CLOSE, OPEN, BINMODE, EOF, TELL, SEEK, FILENO + -CLOSE, OPEN, EOF, TELL, SEEK, FILENO -READLINE - proper implementation (see comment in Apache::compat) $r->finfo: 1.23 +2 -0 modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h Index: Apache__RequestIO.h === RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Apache__RequestIO.h 2001/11/07 04:03:07 1.22 +++ Apache__RequestIO.h 2001/12/20 18:12:15 1.23 @@ -3,6 +3,8 @@ #define mpxs_Apache__RequestRec_PRINT mpxs_Apache__RequestRec_print #define mpxs_Apache__RequestRec_PRINTF mpxs_ap_rprintf +#define mpxs_Apache__RequestRec_BINMODE(r) \ +r ? &PL_sv_yes : &PL_sv_no /* noop */ #define mpxs_output_flush(r, rcfg) \ /* if ($|) */ \ 1.31 +1 -0 modperl-2.0/xs/maps/modperl_functions.map Index: modperl_functions.map === RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- modperl_functions.map 2001/12/17 16:22:07 1.30 +++ modperl_functions.map 2001/12/20 18:12:16 1.31 @@ -29,6 +29,7 @@ SV *:DEFINE_TIEHANDLE| | SV *:stashsv, SV *:sv=Nullsv apr_size_t:DEFINE_PRINT | | ... apr_size_t:DEFINE_PRINTF | | ... + SV *:DEFINE_BINMODE | | request_rec *:r mpxs_Apache__RequestRec_sendfile | | r, filename=r->filename, offset=0, len=0 mpxs_Apache__RequestRec_read | | r, buffer, bufsiz, offset=0 long:DEFINE_READ | | request_rec *:r, SV *:buffer, int:bufsiz, int:offset=0
cvs commit: modperl-2.0/t/modperl getc.t readline.t sameinterp.t
dougm 01/12/19 19:54:41 Modified:t/apache cgihandler.t compat.t post.t scanhdrs.t t/apisend_fd.t sendfile.t t/directive perlrequire.t t/filter input_body.t input_msg.t lc.t t/hooks access.t trans.t t/modperl getc.t readline.t sameinterp.t Log: enable a bunch of tests when lwp isn't installed now that fallback is more robust make a few adjustments for tests to work with and without lwp Revision ChangesPath 1.2 +1 -1 modperl-2.0/t/apache/cgihandler.t Index: cgihandler.t === RCS file: /home/cvs/modperl-2.0/t/apache/cgihandler.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cgihandler.t 2001/05/05 22:08:45 1.1 +++ cgihandler.t 2001/12/20 03:54:40 1.2 @@ -4,7 +4,7 @@ use Apache::Test; use Apache::TestRequest; -plan tests => 2, \&have_lwp; +plan tests => 2; my $location = "/TestApache::cgihandler"; my $str; 1.9 +3 -2 modperl-2.0/t/apache/compat.t Index: compat.t === RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- compat.t 2001/12/14 04:52:45 1.8 +++ compat.t 2001/12/20 03:54:40 1.9 @@ -6,7 +6,7 @@ use Apache::TestUtil; use Apache::TestRequest; -plan tests => 31, todo => [25, 28, 30], \&have_lwp; +plan tests => 31, todo => [25, 28, 30]; my $location = "/TestApache::compat"; @@ -23,9 +23,10 @@ # $r->content { my @data = (test => 'content'); +my $content = join '=', @data; ok t_cmp( "@data", -POST_BODY($location, \@data), +POST_BODY($location, content => $content), q{$r->content via POST} ); } 1.3 +2 -2 modperl-2.0/t/apache/post.t Index: post.t === RCS file: /home/cvs/modperl-2.0/t/apache/post.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- post.t2001/04/04 04:37:00 1.2 +++ post.t2001/12/20 03:54:40 1.3 @@ -4,7 +4,7 @@ use Apache::Test; use Apache::TestRequest; -plan tests => 2, \&have_lwp; +plan tests => 2; my $location = "/TestApache::post"; my $str; @@ -12,7 +12,7 @@ my @data = (arizona => 'wildcats'); my %data = @data; -$str = POST_BODY $location, \@data; +$str = POST_BODY $location, content => "@data"; ok $str; 1.2 +2 -2 modperl-2.0/t/apache/scanhdrs.t Index: scanhdrs.t === RCS file: /home/cvs/modperl-2.0/t/apache/scanhdrs.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- scanhdrs.t2001/05/08 21:08:40 1.1 +++ scanhdrs.t2001/12/20 03:54:40 1.2 @@ -4,7 +4,7 @@ use Apache::Test; use Apache::TestRequest; -plan tests => 4, \&have_lwp; +plan tests => 4; my $module = 'TestApache::scanhdrs'; my $location = "/$module"; @@ -13,7 +13,7 @@ ok $res->content eq "1..1\nok 1\n"; -ok $res->header('Content-type') eq 'text/test-output'; +ok $res->header('Content-Type') eq 'text/test-output'; ok $res->header('X-Perl-Module') eq $module; 1.3 +3 -2 modperl-2.0/t/api/send_fd.t Index: send_fd.t === RCS file: /home/cvs/modperl-2.0/t/api/send_fd.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- send_fd.t 2001/10/02 13:30:31 1.2 +++ send_fd.t 2001/12/20 03:54:41 1.3 @@ -3,6 +3,7 @@ use Test; use Apache::Test (); +use Apache::TestRequest; plan tests => 3; @@ -10,7 +11,7 @@ my $url = '/TestAPI::send_fd'; -my $data = $config->http_raw_get($url); +my $data = GET_BODY($url); ok $data; @@ -18,6 +19,6 @@ ok length($data) == -s $module; -$data = $config->http_raw_get("$url?noexist.txt"); +$data = GET_BODY("$url?noexist.txt"); ok $data =~ /Not Found/; 1.3 +3 -2 modperl-2.0/t/api/sendfile.t Index: sendfile.t === RCS file: /home/cvs/modperl-2.0/t/api/sendfile.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sendfile.t2001/10/02 13:30:31 1.2 ++
cvs commit: modperl-2.0/t/response/TestApache compat.pm
dougm 01/12/19 17:31:24 Modified:lib/Apache compat.pm t/response/TestApache compat.pm Log: use/require Apache::File; compat Revision ChangesPath 1.32 +2 -0 modperl-2.0/lib/Apache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- compat.pm 2001/12/14 04:52:45 1.31 +++ compat.pm 2001/12/20 01:31:24 1.32 @@ -32,6 +32,8 @@ $INC{'Apache.pm'} = __FILE__; $INC{'Apache/Constants.pm'} = __FILE__; + +$INC{'Apache/File.pm'} = __FILE__; } package Apache; 1.9 +1 -0 modperl-2.0/t/response/TestApache/compat.pm Index: compat.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- compat.pm 2001/12/14 04:52:45 1.8 +++ compat.pm 2001/12/20 01:31:24 1.9 @@ -84,6 +84,7 @@ } } elsif ($data{test} eq 'Apache::File') { +require Apache::File; my $file = $vars->{t_conf_file}; debug "new Apache::File file object";
cvs commit: modperl-2.0/xs/APR/PerlIO apr_perlio.c
dougm 01/12/19 10:16:41 Modified:xs/APR/PerlIO apr_perlio.c Log: fix win32 5.6.1 compile Revision ChangesPath 1.6 +1 -1 modperl-2.0/xs/APR/PerlIO/apr_perlio.c Index: apr_perlio.c === RCS file: /home/cvs/modperl-2.0/xs/APR/PerlIO/apr_perlio.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apr_perlio.c 2001/12/18 06:00:14 1.5 +++ apr_perlio.c 2001/12/19 18:16:41 1.6 @@ -372,7 +372,7 @@ type); } -#elif !defined(PERLIO_LAYERS) /* NOT PERLIO_LAYERS (5.6.1) */ +#elif !defined(PERLIO_LAYERS) && !defined(WIN32) /* NOT PERLIO_LAYERS (5.6.1) */ static FILE *apr_perlio_apr_file_to_FILE(pTHX_ apr_file_t *file, int type) {
cvs commit: modperl-2.0/t/response/TestAPR perlio.pm
dougm 01/12/17 22:02:29 Modified:t/response/TestAPR perlio.pm Log: tell works now; XXX broken comment Revision ChangesPath 1.5 +1 -1 modperl-2.0/t/response/TestAPR/perlio.pm Index: perlio.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- perlio.pm 2001/12/18 06:01:43 1.4 +++ perlio.pm 2001/12/18 06:02:29 1.5 @@ -80,7 +80,7 @@ my $pos = 3; seek $fh, $pos, Fcntl::SEEK_SET(); -# XXX: broken + my $got = tell($fh); ok t_cmp($pos, $got,