简体   繁体   中英

WebDav Displayname property missing

I have a problem with this WebDavClient library for C#. I use the following code to establish a connection to a SVN repository:

using (var webdavClient = new WebDavClient())
{
    var result = await webdavClient.Propfind(uri);
    if (result.IsSuccessful)
    {
      ....
    }
 }

After debugging through the C#-library, the actual request seems to work fine. However, there is no displayname property delivered, and I have no idea why the displayname property is missing in the response from the server. The response I get from the server looks like this:

<lp1:response xmlns:V="http://subversion.tigris.org/xmlns/dav/" xmlns:S="http://subversion.tigris.org/xmlns/svn/" xmlns:C="http://subversion.tigris.org/xmlns/custom/" xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/">
  <lp1:href>/svn/repo/folder1</lp1:href>
  <lp1:propstat>
    <lp1:prop>
      <lp1:resourcetype>
        <lp1:collection />
      </lp1:resourcetype>
      <lp1:getcontenttype>text/html; charset=UTF-8</lp1:getcontenttype>
      <lp1:getetag>W/"2//folder1"</lp1:getetag>
      <lp1:creationdate>2016-11-11T12:11:28.864862Z</lp1:creationdate>
      <lp1:getlastmodified>Fri, 11 Nov 2016 12:11:28 GMT</lp1:getlastmodified>
      <lp1:checked-in>
        <lp1:href>/svn/repo/!svn/ver/2/folder1</lp1:href>
      </lp1:checked-in>
      <lp1:version-controlled-configuration>
        <lp1:href>/svn/repo/!svn/vcc/default</lp1:href>
      </lp1:version-controlled-configuration>
      <lp1:version-name>2</lp1:version-name>
      <lp1:auto-version>DAV:checkout-checkin</lp1:auto-version>
      <lp2:baseline-relative-path>folder1</lp2:baseline-relative-path>
      <lp2:repository-uuid>54432e45-83a1-49ac-b790-da67dd1d131f</lp2:repository-uuid>
      <lp2:deadprop-count>0</lp2:deadprop-count>
      <lp1:lockdiscovery />
    </lp1:prop>
    <lp1:status>HTTP/1.1 200 OK</lp1:status>
  </lp1:propstat>
</lp1:response>

A few months back, WebDav-Library was working as expected, but now, however, I can't get it to work anymore. Do you have any suggestions where to look at or what might have gone wrong?

The DAV:displayname property is fully optional. Why would SVN return it, if it's going to match the last part of the path name anyway?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM