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

Dav4Rack gem incorrectly processes folders with spaces (and many other issues) #61

Open
eurodba opened this issue Jan 27, 2015 · 3 comments

Comments

@eurodba
Copy link

eurodba commented Jan 27, 2015

Dear Chris,

Below described bug (or set of bugs) found in Dav4Rack gem, which is working inside Redmine's plugin DMFS. Even if you know, what is Redmine (most probably), I assume that you haven't heard about DMSF plugin. DMSF - coolest functionality extention for Redmine, allowing company to organize internal documents storage directly in Redmine. And one of DMSF's killer features is ability to access stored documents via WebDav protocol. So, as you understand, mentioned WebDav support is realized via your plugin Dav4Rack (as Redmine is written in Ruby). So, now you know our stack. Let's describe bugs, let’s go through all of them, one-by-one:

  • When folder (or file) is created via DMSF's Web interface, and after that deleted - it's still visible via WebDav protocol (only via Windows Explorer!!!). However, columns Size, Type and Last Modified contains error message - see below screenshot:

image

From the other side, accessing the same folder via Total Commander's plugin WebDav (WebDAV / 2.5 / 2013/11/18) shows folder's content absolutely correctly - dropped folder is not visible, all is correct.

  • Next. Trying to access WebDav folder via Total Commander's plugin WebDav (folder name - /dmsf/webdav/f-0004/Fiplan - Internal Documents (e.g. spaces in folder's name) - Dav4Rack crashes, spooling following stack trace into production.log:
Started PROPFIND "/redmine/dmsf/webdav/f-0004/Fiplan%20-%20Internal%20Documents/" for 127.0.0.1 at 2015-01-27 00:41:49 +0100

NoMethodError (undefined method `xmlschema' for DAV4Rack::HTTPStatus::NotFound:Class):
  dav4rack (0.3.0) lib/dav4rack/resource.rb:367:in `get_property'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/dmsf_resource.rb:558:in `get_property'
  dav4rack (0.3.0) lib/dav4rack/resource.rb:116:in `method_missing'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/resource_proxy.rb:151:in `get_property'
  dav4rack (0.3.0) lib/dav4rack/resource.rb:116:in `method_missing'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:510:in `block in get_properties'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:508:in `each'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:508:in `get_properties'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:67:in `block (3 levels) in propfind'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `call'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `insert'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:375:in `method_missing'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:61:in `block (2 levels) in propfind'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:60:in `each'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:60:in `block in propfind'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:468:in `block (2 levels) in render_xml'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `call'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `insert'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:375:in `method_missing'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:465:in `block in render_xml'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:293:in `initialize'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:464:in `new'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:464:in `render_xml'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:487:in `multistatus'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:59:in `propfind'
  dav4rack (0.3.0) lib/dav4rack/handler.rb:30:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:608:in `call'
  rack-openid (1.4.1) lib/rack/openid.rb:99:in `call'
  request_store (1.0.5) lib/request_store/middleware.rb:9:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/no_parse.rb:33:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.19) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.19) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `_run__307596463__call__409538604__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.19) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.19) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.19) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.19) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/static.rb:63:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.19) lib/rails/engine.rb:484:in `call'
  railties (3.2.19) lib/rails/application.rb:231:in `call'
  railties (3.2.19) lib/rails/railtie/configurable.rb:30:in `method_missing'
  rack (1.4.5) lib/rack/urlmap.rb:64:in `block in call'
  rack (1.4.5) lib/rack/urlmap.rb:49:in `each'
  rack (1.4.5) lib/rack/urlmap.rb:49:in `call'
  thin-1.6.1-x86 (mingw32) lib/thin/connection.rb:82:in `block in pre_process'
  thin-1.6.1-x86 (mingw32) lib/thin/connection.rb:80:in `catch'
  thin-1.6.1-x86 (mingw32) lib/thin/connection.rb:80:in `pre_process'
  thin-1.6.1-x86 (mingw32) lib/thin/connection.rb:55:in `process'
  thin-1.6.1-x86 (mingw32) lib/thin/connection.rb:41:in `receive_data'
  eventmachine-1.0.3-x86 (mingw32) lib/eventmachine.rb:187:in `run_machine'
  eventmachine-1.0.3-x86 (mingw32) lib/eventmachine.rb:187:in `run'
  thin-1.6.1-x86 (mingw32) lib/thin/backends/base.rb:73:in `start'
  thin-1.6.1-x86 (mingw32) lib/thin/server.rb:162:in `start'
  thin-1.6.1-x86 (mingw32) lib/thin/controllers/controller.rb:87:in `start'
  thin-1.6.1-x86 (mingw32) lib/thin/runner.rb:200:in `run_command'
  thin-1.6.1-x86 (mingw32) lib/thin/runner.rb:156:in `run!'
  thin-1.6.1-x86 (mingw32) bin/thin:6:in `<top (required)>'
  bin/thin:16:in `load'
  bin/thin:16:in `<main>'
  • However, in the same time, accessing the same folder via any browser (Chrome in my case) - all is working fine, Chrome can traverse into folder Fiplan - Internal Documents, containing spaces in the name. During that action, Dav4Rack is spooling different command into production.log:
Started GET "/redmine/dmsf/webdav/f-0004/Fiplan%20-%20Internal%20Documents" for 127.0.0.1 at 2015-01-27 00:55:33 +0100

(e.g. TC's plugin send PROPFIND, however, Browser - GET)

  • And now - finally, complete mess - from that point I do not understand anything... Look. I rename my folder Fiplan - Internal Documents and remove all spaces: FiplanInternalDocument. Trying to get into it via Browser (Chrome) - all OK, as before. The same via Total Commander's WebDav plugin - error is the same:
Started PROPFIND "/redmine/dmsf/webdav/f-0004/FiplanInternalDocuments/" for 127.0.0.1 at 2015-01-27 01:06:07 +0100

NoMethodError (undefined method `xmlschema' for DAV4Rack::HTTPStatus::NotFound:Class):
  dav4rack (0.3.0) lib/dav4rack/resource.rb:367:in `get_property'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/dmsf_resource.rb:558:in `get_property'
  dav4rack (0.3.0) lib/dav4rack/resource.rb:116:in `method_missing'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/resource_proxy.rb:151:in `get_property'
  dav4rack (0.3.0) lib/dav4rack/resource.rb:116:in `method_missing'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:510:in `block in get_properties'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:508:in `each'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:508:in `get_properties'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:67:in `block (3 levels) in propfind'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `call'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `insert'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:375:in `method_missing'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:61:in `block (2 levels) in propfind'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:60:in `each'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:60:in `block in propfind'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:468:in `block (2 levels) in render_xml'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `call'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `insert'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:375:in `method_missing'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:465:in `block in render_xml'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:293:in `initialize'

<... cut ...>

Now I made folder's name shorter: FiInDo - result again is the same - Brower can access such folder's name TC - can't:

Started PROPFIND "/redmine/dmsf/webdav/f-0004/FiInDo/" for 127.0.0.1 at 2015-01-27 01:09:11 +0100

NoMethodError (undefined method `xmlschema' for DAV4Rack::HTTPStatus::NotFound:Class):
  dav4rack (0.3.0) lib/dav4rack/resource.rb:367:in `get_property'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/dmsf_resource.rb:558:in `get_property'
  dav4rack (0.3.0) lib/dav4rack/resource.rb:116:in `method_missing'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/resource_proxy.rb:151:in `get_property'
  dav4rack (0.3.0) lib/dav4rack/resource.rb:116:in `method_missing'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:510:in `block in get_properties'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:508:in `each'
  dav4rack (0.3.0) lib/dav4rack/controller.rb:508:in `get_properties'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:67:in `block (3 levels) in propfind'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `call'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in `insert'
  nokogiri-1.6.5-x86 (mingw32) lib/nokogiri/xml/builder.rb:375:in `method_missing'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/controller.rb:61:in `block (2 levels) in propfind

<... cut ...>

So, at that moment I start to crash my keyboard and scream on monitor.... :) We need your help, Chris...

P.S. I really hope, that you can still provide support for your project Dav4Rack, as, accoring to your repositiry, last activity with Dav4Rack was 2 years ago... However, it's clear, that you continue to support your other projects. So, all DMSF community is waiting for your reply, keeping fingers crossed!!!

P.P.S. As I was not sure initially, where is issue, on which level - with TC's plugin WebDav, with DMSF or with Dav4Rack - I have already started discussion with Mr. Ghisler (developer of Total Commander, www.ghisler.ch) - see http://www.ghisler.ch/board/viewtopic.php?t=40800 (however, discussion with him continued via e-mails, as his blog's engine (phpBB) is very old and I can't post logs - blog recognize my logs as URLs and says that I am spammer and declines me - sad). Mr. Ghisler's founding is following - he pointed that difference between plugin WebDav and Chrome is, that Chrome adds "/" (slash) at the end of all paths. From my side I can comment, that difference is also in command - WebDav plugin sends command PROPFIND, however, Chrome sends GET.

P.P.P.S. There is issue opened in DMSF's Issue list on GitHub (opened by another guy), where I have posted my issues, as topicstarted was experienced similar issues as me: danmunn/redmine_dmsf#334

@eurodba
Copy link
Author

eurodba commented Jan 27, 2015

Forgot to mentioned - my environment.

Server:

Environment:
  Redmine version                2.6.0.stable
  Ruby version                   2.0.0-p594 (2014-10-27) [i386-mingw32]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.10
  Git                            1.9.5
  Filesystem                     
Redmine plugins:
  redmine_agile                  1.3.5
  redmine_changeauthor           1.0.0
  redmine_checklists             3.0.2
  redmine_contacts               3.4.4
  redmine_dmsf                   1.4.9 stable
  redmine_inline_attach_screenshot 0.4.6
  redmine_questions              0.0.5
  redmine_screenshot_paste       2.1.0

Client:

The same machine, Windows Server 2012R2 / Windows 8.1 64-bit / Windows 7 64-bit (IE11 / Chrome 39.0.2171.99 m) - behavior is the same negative on all platforms.

@chrisroberts
Copy link
Owner

Hi! I just haven't had a chance to touch on this library in quite awhile. WebDAV can be a drag simply because clients never act the same and work arounds abound. There's lots of stuff here (thanks for being so verbose!) to dig through. I've taken some initial looks but I'm going to have to get things running so I can run some tests. Realistically I'm shooting for having some time to dig into this next week. If you have any more informations come up before them, please dump them in here.

Thanks!

@eurodba
Copy link
Author

eurodba commented Feb 16, 2015

Hi, thanks a lot for your answer!!! I am looking for your findings. Believe me, lots of people across the world waiting for the resolution of mentioned issues with your gem :)
From my side, I can offer only following: once your are done with any new intermediate release/commit, I can perform testing using my environment. Sorry, but that is only, what I can offer for you / for the current situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants