Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/dav4rack/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ def propfind
unless(resource.exist?)
NotFound
else
unless(request_document.xpath("//#{ns}propfind/#{ns}allprop").empty?)
# Per RFC 2518 §8.1
# An empty PROPFIND request body must be treated as a request for the names and values of all properties.
if !request_document.xpath("//#{ns}propfind/#{ns}allprop").empty? or (request.content_length == '0') or (request.content_length.nil?)
properties = resource.properties
else
check = request_document.xpath("//#{ns}propfind")
Expand Down