CC: | "扶凯" <iakuf [...] 163.com> |
Subject: | Net::DAV::Server propfind method does not directly handle supportedlock property. |
Report from 扶凯 in email:
------------
HI
Yourmodulepropfindmethod,lessanrfc 2518implementationofafunction.Because of
thisfeature,soI want to useyourmoduleto achievethe Gitserverwhenbug.
Iif ($ reqinfo eq 'prop') { addthe followingcontentto repair.
elsif ( $ns eq 'DAV:' && $name eq 'supportedlock' ) {
do {
$prop = _dav_child( $okprops, 'supportedlock' );
#for my $n (qw(exclusive shared)) { # shared is currently not supported.
for my $n (qw(exclusive)) {
my $lock = _dav_child( $prop, 'lockentry' );
_dav_child( _dav_child( $lock, 'lockscope' ), $n );
_dav_child( _dav_child( $lock, 'locktype' ), 'write' );
}
};
}
Detailed contentcan be seenrfc 13.11.1,trouble youfixcpanonthe bug,soI canuse it
toaddPlackto doasimpleGit server.Thanks
13.11.1 Example - Retrieving the supportedlock Property
Request
PROPFIND /container/ HTTP/1.1
Goland, et al. Standards Track [Page 73]
^L
RFC 2518 WEBDAV February 1999
Host: www.foo.bar
Content-Length: xxxx
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:prop><D:supportedlock/></D:prop>
</D:propfind>
Response
HTTP/1.1 207 Multi-Status
Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.foo.bar/container/</D:href>
<D:propstat>
<D:prop>
<D:supportedlock>
<D:lockentry>
<D:lockscope><D:exclusive/></D:lockscope>
<D:locktype><D:write/></D:locktype>
</D:lockentry>
<D:lockentry>
<D:lockscope><D:shared/></D:lockscope>
<D:locktype><D:write/></D:locktype>
</D:lockentry>
</D:supportedlock>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>