Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix propfind for microsoft web redirector #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
14 changes: 9 additions & 5 deletions dav4rack.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,25 @@ Gem::Specification.new do |s|
LICENSE
dav4rack.gemspec
lib/dav4rack.rb
lib/dav4rack/file_resource.rb
lib/dav4rack/handler.rb
lib/dav4rack/controller.rb
lib/dav4rack/file.rb
lib/dav4rack/file_resource_lock.rb
lib/dav4rack/handler.rb
lib/dav4rack/http_status.rb
lib/dav4rack/resource.rb
lib/dav4rack/interceptor.rb
lib/dav4rack/interceptor_resource.rb
lib/dav4rack/remote_file.rb
lib/dav4rack/file.rb
lib/dav4rack/lock.rb
lib/dav4rack/lock_store.rb
lib/dav4rack/logger.rb
lib/dav4rack/remote_file.rb
lib/dav4rack/resource.rb
lib/dav4rack/resources/file_resource.rb
lib/dav4rack/resources/mongo_resource.rb
lib/dav4rack/utils.rb
lib/dav4rack/version.rb
bin/dav4rack
spec/handler_spec.rb
spec/mongo_spec.rb
README.rdoc
}
end
4 changes: 2 additions & 2 deletions lib/dav4rack/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def propfind
unless(resource.exist?)
NotFound
else
unless(request_document.xpath("//#{ns}propfind/#{ns}allprop").empty?)
properties = resource.properties
if request_document.xpath("//#{ns}propfind").empty? || request_document.xpath("//#{ns}propfind/#{ns}allprop").present?
properties = resource.properties.map { |prop| DAVElement.new(prop.merge(:namespace => DAVElement.new(:href => prop[:ns_href]))) }
else
check = request_document.xpath("//#{ns}propfind")
if(check && !check.empty?)
Expand Down