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);