From 9e268f7d2d3006680cc7827a5345233b7e788867 Mon Sep 17 00:00:00 2001 From: Artyom Ignatiev Date: Tue, 12 Mar 2013 18:14:00 +0400 Subject: [PATCH 1/2] Fix PROPFIND for microsoft webdav-miniredirector --- lib/dav4rack/controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dav4rack/controller.rb b/lib/dav4rack/controller.rb index e049152..4dc882e 100644 --- a/lib/dav4rack/controller.rb +++ b/lib/dav4rack/controller.rb @@ -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?) From 734ccbac30d2354bfac9440d2bbc8072531513e0 Mon Sep 17 00:00:00 2001 From: Artyom Ignatiev Date: Tue, 12 Mar 2013 18:20:07 +0400 Subject: [PATCH 2/2] fix gemspec --- dav4rack.gemspec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dav4rack.gemspec b/dav4rack.gemspec index 23369d3..b222f1f 100644 --- a/dav4rack.gemspec +++ b/dav4rack.gemspec @@ -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