Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Files are returned as directories for Depth: infinity requests #41

Open
agross opened this issue Jan 1, 2019 · 0 comments
Open

Files are returned as directories for Depth: infinity requests #41

agross opened this issue Jan 1, 2019 · 0 comments

Comments

@agross
Copy link

agross commented Jan 1, 2019

My WebDAV server (ownCloud) supports Depth: infinity PROPFIND requests which is much faster than specifying dav.find(..., recursive: true). However, for those requests items are returned as directories instead of files (i.e. every item.type == :directory).

result = []

Net::DAV.start(URL) do |dav|
  dav.credentials('user', 'secret')
  dav.headers('Depth' => 'infinity')

  dav.find(root) do |item|
    next unless item.type == :file

    result << item
  end
end

result

# => result is always empty
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant