Skip to content

Commit

Permalink
RT#103126: add a trailing '/' correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosimo Streppone committed Mar 26, 2015
1 parent e26055d commit 97c90e0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/HTTP/DAV/ResourceList.pm
Expand Up @@ -158,20 +158,19 @@ sub get_locktokens {
my $u = $url->canonical();

# Add a trailing slash
s{/*$}{/} for $r, $u;

if ($u =~ /\Q$r/ ) {
$r =~ s{/*$}{/};
$u =~ s{/*$}{/};

if ($u =~ m{\Q$r}) {
my @locks = $resource->get_locks(-owned=>$owned);
#my $uri = $resource_uri->path();
foreach my $lock (@locks) {
my @lock_tokens = @{$lock->get_locktokens()};
push(@{$tokens{$resource_uri}}, @lock_tokens);
}

}

} # foreach uri

} # foreach resource

return \%tokens;
Expand Down

0 comments on commit 97c90e0

Please sign in to comment.