# HG changeset patch # User Sergey Kandaurov # Date 1577119129 -10800 # Node ID 0ce1c95167647b880ffe7f71d50d9f77e0672a89 # Parent 144c6ce732e4aebc8b363e74e60622611aea8d67 Tests: dav.t MKCOL test for trailing slash in Location (if any). diff --git a/dav.t b/dav.t --- a/dav.t +++ b/dav.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http dav/)->plan(20); +my $t = Test::Nginx->new()->has(qw/http dav/)->plan(21); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -39,6 +39,8 @@ http { listen 127.0.0.1:8080; server_name localhost; + absolute_redirect off; + location / { dav_methods PUT DELETE MKCOL COPY MOVE; } @@ -117,6 +119,13 @@ EOF like($r, qr/201 Created.*(Content-Length|\x0d\0a0\x0d\x0a)/ms, 'mkcol'); +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.17.7'); + +like($r, qr!(?(?{ $r =~ /Location/ })Location: /test/)!, 'mkcol location'); + +} + $r = http(<testdir() . '/alias', 10, 'put alias size'); ###############################################################################