以下回复片段是PROPFIND回复的一部分:
samp <- read.csv("test.csv", nrows=1, strings=F) # read one row
cols <- sapply(samp, class) # get classes
key <- c("character"="c", "integer"="i", "logical"="l") # make key, etc.
read_csv("test.csv", col_types=paste(key[cols], collapse="")) # read with read_csv
<D:response>
<D:href>https://dav.mystery-meat.com/top</D:href>
<D:propstat>
<D:prop>
<D:creationdate ns0:dt="dateTime.tz">1970-01-01T00:00:00Z</D:creationdate>
<D:getcontentlanguage>en</D:getcontentlanguage>
<D:getcontentlength>16384</D:getcontentlength>
<D:getcontenttype>httpd/unix-directory</D:getcontenttype>
<D:getlastmodified ns0:dt="dateTime.rfc1123">Thu, 01 Jan 1970 00:00:00 GMT</D:getlastmodified>
<D:resourcetype><D:collection/></D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
值不是此目录中项目的总字节数。 WebDAV中的此值是否有任何预定义的含义,或者它只是由每个报告值的服务器实现或定义?
即。是真的有用吗?
答案 0 :(得分:1)
阅读the RFC,像往常一样有一个完美的定义:
目的:包含没有接受标头的GET返回的Content-Length标头。
如果不清楚,它基本上会说,如果您在没有GET
标头的同一资源上执行Accept-*
请求,则响应将报告Content-Length
这是{值。
因此,如果您的WebDAV实现符合标准,那么您应该只需对集合执行GET
请求即可轻松测试。您可能会获得一些自动生成的HTML响应。
如果对此GET
请求的响应与通过{DAV:}getcontentlength
报告的大小(以字节为单位)不同,则应将其视为错误。
我认为在您的特定情况下,它可能是一个错误。报告的集合大小恰好是2的幂,这使我相信这个特定的服务器返回该目录stat()
的结果,这就是目录列表占用的空间大小。 filesystem(与使用ls
时的编号相同)。
如果我的预感是真的,那么服务器基本上已经破坏了行为。