diff --git a/lib/net/dav.rb b/lib/net/dav.rb
index 4528c09..03bb7f4 100644
--- a/lib/net/dav.rb
+++ b/lib/net/dav.rb
@@ -425,11 +425,20 @@ def headers(headers)
# how to retrieve access control properties.
def propfind(path,*options)
headers = {'Depth' => '1'}
- if(options[0] == :acl)
- body = '' +
- ''
- else
+ acl_body = '' +
+ ''
+ if options.size == 1
+ if (options[0] == :acl)
+ body = acl_body
+ else
+ body = options[0]
+ end
+ elsif options.size == 2
body = options[0]
+ if options[1].is_a? Hash
+ opts = options[1]
+ headers['Depth'] = opts[:depth] if opts.include? :depth
+ end
end
if(!body)
body = ''