gozer 2004/08/17 16:40:41
Modified: . Changes t/response/TestDirective cmdparms.pm xs/maps apache_structures.map modperl_functions.map Log: Apache::CmdParms->limited member replaced by is_method_limited() method Revision Changes Path 1.451 +3 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.450 retrieving revision 1.451 diff -u -r1.450 -r1.451 --- Changes 17 Aug 2004 22:51:24 -0000 1.450 +++ Changes 17 Aug 2004 23:40:41 -0000 1.451 @@ -12,6 +12,9 @@ =item 1.99_15-dev +Apache::CmdParms->limited member replaced by is_method_limited() +method [Gozer] + Apache::Module changes [Gozer] - readwrite => readonly: cmds, next, name, module_index, minor_version, version 1.7 +16 -3 modperl-2.0/t/response/TestDirective/cmdparms.pm Index: cmdparms.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/cmdparms.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cmdparms.pm 14 Aug 2004 05:20:19 -0000 1.6 +++ cmdparms.pm 17 Aug 2004 23:40:41 -0000 1.7 @@ -35,7 +35,7 @@ }, ); -my @methods = qw(cmd context directive info limited override path +my @methods = qw(cmd context directive info override path pool server temp_pool); sub TestCmdParms { @@ -46,6 +46,8 @@ } $srv_cfg->{$args}{check_ctx} = $parms->check_cmd_context(Apache::NOT_IN_LOCATION); + + $srv_cfg->{$args}{limited} = $parms->method_is_limited('GET'); } sub get_config { @@ -59,7 +61,7 @@ my $override; my $srv_cfg = $self->get_config($r->server); - plan $r, tests => 6 + ( 8 * keys(%$srv_cfg) ); + plan $r, tests => 9 + ( 7 * keys(%$srv_cfg) ); foreach my $cfg (values %$srv_cfg) { ok t_cmp(ref($cfg->{cmd}), 'Apache::Command', 'cmd'); @@ -68,7 +70,6 @@ ok t_cmp(ref($cfg->{pool}), 'APR::Pool', 'pool'); ok t_cmp(ref($cfg->{temp_pool}), 'APR::Pool', 'temp_pool'); ok t_cmp(ref($cfg->{server}), 'Apache::ServerRec', 'server'); - ok t_cmp($cfg->{limited}, -1, 'limited'); ok t_cmp($cfg->{info}, 'cmd_data', 'cmd_data'); } @@ -85,6 +86,7 @@ ok t_cmp($masked, $wanted, 'override bitmask'); ok t_cmp($vhost->{path}, undef, 'path'); ok t_cmp($vhost->{check_ctx}, undef, 'check_cmd_ctx'); + ok $vhost->{limited}; } # Location @@ -103,6 +105,13 @@ ok t_cmp($loc->{path}, '/TestDirective__cmdparms', 'path'); ok t_cmp($loc->{check_ctx}, KEY . ' cannot occur within <Location> section', 'check_cmd_ctx'); + ok $loc->{limited}; + } + + # Limit + { + my $limit = $srv_cfg->{Limit}; + ok !$limit->{limited}; } return Apache::OK; @@ -119,3 +128,7 @@ </Base> TestCmdParms "Location" + +<LimitExcept GET> + TestCmdParms "Limit" +</LimitExcept> 1.45 +1 -1 modperl-2.0/xs/maps/apache_structures.map Index: apache_structures.map =================================================================== RCS file: /home/cvs/modperl-2.0/xs/maps/apache_structures.map,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- apache_structures.map 17 Aug 2004 22:51:24 -0000 1.44 +++ apache_structures.map 17 Aug 2004 23:40:41 -0000 1.45 @@ -234,7 +234,7 @@ <cmd_parms> - info < override -< limited +! limited ! limited_xmethods ! xlimited ! config_file 1.83 +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.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- modperl_functions.map 11 Aug 2004 23:03:17 -0000 1.82 +++ modperl_functions.map 17 Aug 2004 23:40:41 -0000 1.83 @@ -145,6 +145,7 @@ MODULE=Apache::CmdParms ap_check_cmd_context + ap_method_is_limited mpxs_Apache__CmdParms_info MODULE=Apache::MPM PACKAGE=Apache::MPM BOOT=1