问题
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