Mailing List Archive

svn commit: r1682286 - in /perl/modperl/trunk/t: api/ filter/ filter/TestFilter/ modules/ protocol/ protocol/TestProtocol/ response/TestAPI/ response/TestModules/
Author: stevehay
Date: Thu May 28 17:17:12 2015
New Revision: 1682286

URL: http://svn.apache.org/r1682286
Log:
In httpd-2.4, the Allow/Deny/Order directives are in mod_access_compat instead of mod_authz_host, and the Satisfy directive is now also in mod_access_compat instead of core. Also allow running test suite if httpd.conf of the Apache we're building against (which is used to configure t/conf/httpd.conf) doesn't load mod_access_compat.

Modified:
perl/modperl/trunk/t/api/access2_24.t
perl/modperl/trunk/t/filter/TestFilter/both_str_req_proxy.pm
perl/modperl/trunk/t/filter/both_str_req_proxy.t
perl/modperl/trunk/t/modules/proxy.t
perl/modperl/trunk/t/protocol/TestProtocol/pseudo_http.pm
perl/modperl/trunk/t/protocol/pseudo_http.t
perl/modperl/trunk/t/response/TestAPI/access2_24.pm
perl/modperl/trunk/t/response/TestModules/proxy.pm

Modified: perl/modperl/trunk/t/api/access2_24.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/api/access2_24.t?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/api/access2_24.t (original)
+++ perl/modperl/trunk/t/api/access2_24.t Thu May 28 17:17:12 2015
@@ -7,8 +7,8 @@ use Apache::TestRequest;

if (have_min_apache_version("2.4.0")) {

-plan tests => 6, need need_lwp, need_auth, need_access, 'mod_version.c',
- 'HTML::HeadParser';
+plan tests => 6, need need_lwp, need_auth, need_access, 'mod_access_compat.c',
+ 'mod_version.c', 'HTML::HeadParser';

my $location = "/TestAPI__access2";


Modified: perl/modperl/trunk/t/filter/TestFilter/both_str_req_proxy.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/filter/TestFilter/both_str_req_proxy.pm?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/filter/TestFilter/both_str_req_proxy.pm (original)
+++ perl/modperl/trunk/t/filter/TestFilter/both_str_req_proxy.pm Thu May 28 17:17:12 2015
@@ -62,10 +62,21 @@ __DATA__
<NoAutoConfig>
<IfModule mod_proxy.c>
<Proxy http://@servername@:@port@/*>
- <IfModule @ACCESS_MODULE@>
- Order Deny,Allow
- Deny from all
- Allow from @servername@
+ <IfModule mod_version.c>
+ <IfVersion < 2.3.0>
+ <IfModule @ACCESS_MODULE@>
+ Order Deny,Allow
+ Deny from all
+ Allow from @servername@
+ </IfModule>
+ </IfVersion>
+ <IfVersion > 2.4.1>
+ <IfModule mod_access_compat.c>
+ Order Deny,Allow
+ Deny from all
+ Allow from @servername@
+ </IfModule>
+ </IfVersion>
</IfModule>
</Proxy>


Modified: perl/modperl/trunk/t/filter/both_str_req_proxy.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/filter/both_str_req_proxy.t?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/filter/both_str_req_proxy.t (original)
+++ perl/modperl/trunk/t/filter/both_str_req_proxy.t Thu May 28 17:17:12 2015
@@ -6,8 +6,9 @@ use Apache::Test;
use Apache::TestRequest;
use Apache::TestUtil;

-plan tests => 1, need need_module(qw(mod_proxy proxy_http.c)),
- need_access;
+my @modules = qw(mod_proxy proxy_http.c);
+push @modules, 'mod_access_compat.c' if have_min_apache_version("2.4.0");
+plan tests => 1, need need_module(@modules), need_access;

my $data = join ' ', 'A'..'Z', 0..9;
my $expected = lc $data; # that's what the input filter does

Modified: perl/modperl/trunk/t/modules/proxy.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/modules/proxy.t?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/modules/proxy.t (original)
+++ perl/modperl/trunk/t/modules/proxy.t Thu May 28 17:17:12 2015
@@ -11,8 +11,9 @@ my $url = Apache::TestRequest::module

t_debug("connecting to $url");

-plan tests => 1, need need_module(qw(mod_proxy proxy_http.c)),
- need_access;
+my @modules = qw(mod_proxy proxy_http.c);
+push @modules, 'mod_access_compat' if have_min_apache_version("2.4.0");
+plan tests => 1, need need_module(@modules), need_access;

my $expected = "ok";
my $received = GET_BODY_ASSERT $url;

Modified: perl/modperl/trunk/t/protocol/TestProtocol/pseudo_http.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/protocol/TestProtocol/pseudo_http.pm?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/protocol/TestProtocol/pseudo_http.pm (original)
+++ perl/modperl/trunk/t/protocol/TestProtocol/pseudo_http.pm Thu May 28 17:17:12 2015
@@ -155,9 +155,19 @@ __END__

<Location TestProtocol::pseudo_http>

- <IfModule @ACCESS_MODULE@>
- Order Deny,Allow
- Allow from @servername@
+ <IfModule mod_version.c>
+ <IfVersion < 2.3.0>
+ <IfModule @ACCESS_MODULE@>
+ Order Deny,Allow
+ Allow from @servername@
+ </IfModule>
+ </IfVersion>
+ <IfVersion > 2.4.1>
+ <IfModule mod_access_compat.c>
+ Order Deny,Allow
+ Allow from @servername@
+ </IfModule>
+ </IfVersion>
</IfModule>

<IfModule @AUTH_MODULE@>
@@ -169,7 +179,16 @@ __END__
AuthName TestProtocol::pseudo_http
AuthType Basic
Require user stas
- Satisfy any
+ <IfModule mod_version.c>
+ <IfVersion < 2.3.0>
+ Satisfy any
+ </IfVersion>
+ <IfVersion > 2.4.1>
+ <IfModule mod_access_compat.c>
+ Satisfy any
+ </IfModule>
+ </IfVersion>
+ </IfModule>

</Location>


Modified: perl/modperl/trunk/t/protocol/pseudo_http.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/protocol/pseudo_http.t?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/protocol/pseudo_http.t (original)
+++ perl/modperl/trunk/t/protocol/pseudo_http.t Thu May 28 17:17:12 2015
@@ -22,7 +22,9 @@ my $passbad = "foObaR";
# blocking socket bug fixed in 2.0.52
my $ok = $^O !~ /^(Open|Net)BSD$/i || need_min_apache_version('2.0.52');

-plan tests => 13, need need_auth, need_access, $ok;
+my @modules = ();
+push @modules, 'mod_access_compat.c' if have_min_apache_version("2.4.0");
+plan tests => 13, need need_auth, need_access, @modules, $ok;

{
# supply correct credential when prompted for such and ask the

Modified: perl/modperl/trunk/t/response/TestAPI/access2_24.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestAPI/access2_24.pm?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestAPI/access2_24.pm (original)
+++ perl/modperl/trunk/t/response/TestAPI/access2_24.pm Thu May 28 17:17:12 2015
@@ -104,7 +104,7 @@ PerlAddAuthzProvider my-group TestAPI::a
PerlResponseHandler Apache::TestHandler::ok1
SetHandler modperl

- <IfModule @ACCESS_MODULE@>
+ <IfModule mod_access_compat.c>
# needed to test $r->satisfies
Allow from All
</IfModule>
@@ -115,7 +115,9 @@ PerlAddAuthzProvider my-group TestAPI::a
<Limit POST>
Require valid-user
</Limit>
- Satisfy All
+ <IfModule mod_access_compat.c>
+ Satisfy All
+ </IfModule>
<IfModule @AUTH_MODULE@>
# htpasswd -mbc auth-users goo foo
# htpasswd -mb auth-users bar mar

Modified: perl/modperl/trunk/t/response/TestModules/proxy.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestModules/proxy.pm?rev=1682286&r1=1682285&r2=1682286&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestModules/proxy.pm (original)
+++ perl/modperl/trunk/t/response/TestModules/proxy.pm Thu May 28 17:17:12 2015
@@ -47,10 +47,21 @@ __END__
<VirtualHost TestModules::proxy>
<IfModule mod_proxy.c>
<Proxy http://@servername@:@port@/*>
- <IfModule @ACCESS_MODULE@>
- Order Deny,Allow
- Deny from all
- Allow from @servername@
+ <IfModule mod_version.c>
+ <IfVersion < 2.3.0>
+ <IfModule @ACCESS_MODULE@>
+ Order Deny,Allow
+ Deny from all
+ Allow from @servername@
+ </IfModule>
+ </IfVersion>
+ <IfVersion > 2.4.1>
+ <IfModule mod_access_compat.c>
+ Order Deny,Allow
+ Deny from all
+ Allow from @servername@
+ </IfModule>
+ </IfVersion>
</IfModule>
</Proxy>