(httpd-tests) branch trunk updated: test state dir (#19)
[email protected] Fri, 05 Jun 2026 11:04:02 +0000
| Newsgroups | gmane.comp.apache.cvs |
|---|---|
| Message-ID | <178065744297.624560.15416516985752402383@gitbox3-he-fi.apache.org> |
This is an automated email from the ASF dual-hosted git repository.
covener pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/httpd-tests.git
The following commit(s) were added to refs/heads/trunk by this push:
new 6b1e698b test state dir (#19)
6b1e698b is described below
commit 6b1e698b6bc0f5dbc34646ff2b249ece3865c497
Author: Eric Covener <[email protected]>
AuthorDate: Fri Jun 5 07:03:56 2026 -0400
test state dir (#19)
Co-authored-by: Eric Covener <[email protected]>
---
t/modules/dav.t | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/t/modules/dav.t b/t/modules/dav.t
index a1b6248b..8ff990d8 100644
--- a/t/modules/dav.t
+++ b/t/modules/dav.t
@@ -10,7 +10,7 @@ use HTTP::Date;
## mod_dav tests
##
-plan tests => 21, [qw(dav HTTP::DAV)];
+plan tests => 22, [qw(dav HTTP::DAV)];
require HTTP::DAV;
my $vars = Apache::Test::vars();
@@ -178,6 +178,15 @@ print "PR 49825: expect 400 bad request got: $actual\n";
ok $actual == 400;
$user_agent->default_header('Content-Range' => undef);
+## Test PUT to .DAV subdirectory (should be blocked in 2.4.68+) ##
+my $dav_uri = "/$dir/.DAV/test.html";
+my $dav_resource = $dav->new_resource( -uri => "http://$server$dav_uri");
+my $expected = have_min_apache_version('2.4.68') ? 403 : 201;
+$response = $dav_resource->put($body);
+$actual = $response->code;
+ok t_cmp($actual, $expected);
+
## clean up ##
+unlink "$htdocs/$dir/.DAV/test.html";
rmdir "$htdocs/$dir/.DAV" or print "warning: could not remove .DAV dir: $!";
rmdir "$htdocs/$dir" or print "warning: could not remove dav dir: $!";