Meaning of Depth header in WebDAV PROPFIND method

不打扰是莪最后的温柔 提交于 2020-01-16 04:07:07

问题


I am writing something in PHP to create a virtual file system using WebDAV.

I am trying to get my head around the PROPFIND request method. RFC 4918 mentions something about it, but I’m not sure I understand. Can someone clarify this:

  • What is the role of the Depth value (0, 1, infinity)? Has it something to do with folders vs files?
  • Why does the client make multiple PROPFIND requests on a folder?

I think that might help me to sort out some of the rest.

Thanks


回答1:


What is the role of the Depth value (0, 1, infinity)? Has it something to do with folders vs files?

For directories:

  • Depth 0: Retrieve properties of the directory
  • Depth 1: as 0 + properties of all files in the directory
  • Depth infinity: as 1 + properties of all files in sub-directories of the directory (recursively)

For files it has no effect.

The depth applies similarly to other WebDAV methods.



来源:https://stackoverflow.com/questions/31284615/meaning-of-depth-header-in-webdav-propfind-method

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!