cvs commit: modperl-2.0/xs/maps apache_functions.map modperl_functions.map
stas02/01/21 00:27:30 Modified:xs/Apache/Response Apache__Response.h xs/maps apache_functions.map modperl_functions.map Log: - write a wrapper for $r-set_last_modified() to be the same as in 1.x - specify default values for $r-set_content_length and $r-update_mtime as in 1.x Revision ChangesPath 1.6 +9 -0 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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Apache__Response.h6 Jan 2002 22:23:24 - 1.5 +++ Apache__Response.h21 Jan 2002 08:27:30 - 1.6 @@ -25,3 +25,12 @@ rcfg-wbucket-header_parse = 0; /* turn off PerlOptions +ParseHeaders */ } + +static MP_INLINE void +mpxs_Apache__RequestRec_set_last_modified(request_rec *r, apr_time_t mtime) +{ +if (mtime) { +ap_update_mtime(r, mtime); +} +ap_set_last_modified(r); +} 1.42 +3 -3 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.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- apache_functions.map 20 Jan 2002 18:37:05 - 1.41 +++ apache_functions.map 21 Jan 2002 08:27:30 - 1.42 @@ -100,16 +100,16 @@ MODULE=Apache::Response PACKAGE=guess ap_make_etag | | r, force_weak=0 - ap_set_content_length + ap_set_content_length | | r, length=r-finfo.csize ap_set_etag ap_meets_conditions ap_rationalize_mtime - ap_update_mtime + ap_update_mtime | | r, dependency_mtime=0 ap_send_error_response ~ap_send_fd ap_send_mmap | | r, mm, offset, length ap_set_keepalive - ap_set_last_modified +-ap_set_last_modified ap_custom_response MODULE=Apache::Access PACKAGE=Apache::RequestRec 1.33 +2 -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.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- modperl_functions.map 8 Jan 2002 22:48:38 - 1.32 +++ modperl_functions.map 21 Jan 2002 08:27:30 - 1.33 @@ -43,6 +43,8 @@ MODULE=Apache::Response PACKAGE=Apache::RequestRec DEFINE_send_cgi_header | | request_rec *:r, SV *:buffer mpxs_Apache__RequestRec_send_http_header | | r, type=NULL + mpxs_Apache__RequestRec_set_last_modified | | r, mtime=0 + MODULE=Apache::ServerUtil PACKAGE=guess mpxs_Apache__Server_push_handlers
cvs commit: modperl-2.0/t/response/TestApache compat2.pm compat.pm
stas02/01/21 00:32:46 Modified:t/apache compat.t t/response/TestApache compat.pm Added: t/response/TestApache compat2.pm Log: - split compat.pm test into compat.pm (for client side validation) and compat2.pm (for sub-tests that can be completed on the server side). - 2 out of 3 todo tests now pass with recent patches to set_content_length, update_mtime, ap_set_last_modified Revision ChangesPath 1.10 +1 -37 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- compat.t 20 Dec 2001 03:54:40 - 1.9 +++ compat.t 21 Jan 2002 08:32:46 - 1.10 @@ -6,7 +6,7 @@ use Apache::TestUtil; use Apache::TestRequest; -plan tests = 31, todo = [25, 28, 30]; +plan tests = 3; my $location = /TestApache::compat; @@ -41,48 +41,12 @@ ); } -# Apache-gensym -{ -my @data = (test = 'gensym'); -my $data = GET_BODY query(@data) || ''; -ok_nok($data); -} - -# header_in -t_header('in','get_scalar',q{scalar ctx: $r-header_in($key)}); -t_header('in','get_list', q{list ctx: $r-header_in($key)}); -t_header('in','set', q{$r-header_in($key = $val)}); -t_header('in','unset', q{$r-header_in($key = undef)}); - -# header_out -t_header('out','get_scalar',q{scalar ctx: $r-header_out($key)}); -t_header('out','get_list', q{list ctx: $r-header_out($key)}); -t_header('out','set', q{$r-header_out($key = $val)}); -t_header('out','unset', q{$r-header_out($key = undef)}); - -# Apache::File -{ -my @data = (test = 'Apache::File'); -my $data = GET_BODY query(@data) || ''; -ok_nok($data); -} - ### helper subs ### sub query { my(%args) = (@_ % 2) ? %{+shift} : @_; $location? . join '', map { $_=$args{$_} } keys %args; } - -sub t_header { -my ($way, $what, $comment) = @_; -ok t_cmp( -ok, -GET_BODY(query(test = 'header', way = $way, what = $what)), -$comment -); -} - # accepts multiline var where, the lines matching: # ^ok\n$ results in ok(1) 1.10 +3 -140modperl-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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- compat.pm 20 Dec 2001 01:31:24 - 1.9 +++ compat.pm 21 Jan 2002 08:32:46 - 1.10 @@ -1,5 +1,8 @@ package TestApache::compat; +# these Apache::compat tests are all run on the server +# side and validated on the client side. See also TestApache::compat2. + use strict; use warnings FATAL = 'all'; @@ -33,146 +36,6 @@ if ($data{test} eq 'content' || $data{test} eq 'args') { $r-print(test $data{test}); -} -elsif ($data{test} eq 'gensym') { -debug Apache-gensym; -my $fh = Apache-gensym; -ok ref $fh eq 'GLOB'; -} -elsif ($data{test} eq 'header') { -my $way = $data{way}; -my $sub = header_$way; -my $sub_good = headers_$way; -if ($data{what} eq 'get_scalar') { -# get in scalar ctx -my $key; -if ($way eq 'in') { -$key = user-agent; # should exist with lwp -} -else { -# outgoing headers aren't set yet, so we set one -$key = X-barabara; -$r-$sub_good-set($key, $key x 2); -} -my $exp = $r-$sub_good-get($key); -my $got = $r-$sub($key); -$r-print(t_is_equal($exp, $got) ? 'ok' : 'nok'); -} -elsif ($data{what} eq 'get_list') { -# get in list ctx -my $key = $data{test}; -my @exp = qw(foo bar); -$r-$sub_good-add($key = $_) for @exp; -my @got = $r-$sub($key); -$r-print(t_is_equal(\@exp, \@got) ? 'ok' : 'nok'); -} -elsif ($data{what} eq 'set') { -# set -my $key = $data{test}; -my $exp = $key x 2; -$r-$sub($key = $exp); -my $got = $r-$sub($key); -$r-print(t_is_equal($exp, $got) ? 'ok' : 'nok'); -} -elsif ($data{what} eq 'unset') { -# unset -my $key = $data{test}; -my $exp = undef; -$r-$sub($key = $exp); -my $got = $r-$sub($key); -$r-print(t_is_equal($exp, $got) ? 'ok' : 'nok'); -} -} -elsif ($data{test} eq 'Apache::File')
cvs commit: modperl-2.0/todo missing_old_features.txt
stas02/01/21 00:40:54 Modified:todo missing_old_features.txt Log: - Apache::File has been ported Revision ChangesPath 1.17 +1 -1 modperl-2.0/todo/missing_old_features.txt Index: missing_old_features.txt === RCS file: /home/cvs/modperl-2.0/todo/missing_old_features.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- missing_old_features.txt 14 Dec 2001 02:07:30 - 1.16 +++ missing_old_features.txt 21 Jan 2002 08:40:54 - 1.17 @@ -42,7 +42,7 @@ - Apache::ModuleConfig -- Apache::File, Apache::Util +- Apache::Util - see also: xs/maps/apache_functions.map
cvs commit: modperl/Apache Apache.pm
stas02/01/21 06:32:35 Modified:Apache Apache.pm Log: - document $r-location Submitted by: Issac Goldstand [EMAIL PROTECTED] Reviewed by: stas Revision ChangesPath 1.69 +6 -0 modperl/Apache/Apache.pm Index: Apache.pm === RCS file: /home/cvs/modperl/Apache/Apache.pm,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- Apache.pm 14 Jan 2002 03:12:51 - 1.68 +++ Apache.pm 21 Jan 2002 14:32:34 - 1.69 @@ -390,6 +390,12 @@ filename translation, optionally changing it with the first argument if you happen to be doing the translation. +=item $r-Egtlocation + +The $r-Egtlocation method will return the path of the +EltLocationEgt section from which the current CPerl*Handler is +being called. + =item $r-Egtpath_info( [$path_info] ) The $r-Egtpath_info method will return what is left in the path after the