#29 problem with path with space on Microsoft IIS

closed
None
5
2008-04-28
2008-02-13
david
No

When I mount a webdav from a Microsoft IIS (sharepoint 2003), I can mount it without any problem (authentification worked). But All directory with a space inside are not seen.

I got the same behavior with fuse and coda. With "debug most" I can't find those directories with a space inside in the log. Path without space are not showing this behavior. The same behaviour is happening with cadaver. I checked under windows the webdav and everything is working as expected.

version tested : davfs2-1.2.1 and davfs2-1.3.0

# uname -a
Linux test 2.6.22-3-686 #1 SMP Mon Nov 12 08:32:57 UTC 2007 i686 GNU/Linux

# system Debian testing.

Do you have any suggestions or test, has my webdav knowlegde is yet still small.

Discussion

  • Werner Baumann
    Werner Baumann
    2008-02-13

    Logged In: YES
    user_id=1260327
    Originator: NO

    Hello David,

    I just tested with IIS 6.0 (no sharepoint) and the error did not show.

    Please proceed like this:

    - Set another debug option
    debug most
    debug httpbody

    - mount the filesystem

    - do "ls -al" for a directory, that should contain filenames
    with spaces

    - unmount

    - search in the logfiles for a PROPFIND-request for this directory.
    It should look like
    "PROPFIND /mit%20Leerzeichen/ HTTP/1.1^M"
    "%20" is the HTTP-encoded space
    (it is not necessary, that the directory name has a space)

    - copy everything starting with that PROPFIND-request up to the
    message "Closing".

    Please send me:
    - copy of the log-entries
    - output from "ls -al"
    - a listing of that directory from the server (if available),
    to see what the output of "ls -al" should look like.
    If you do not have access to the server, you may get the
    directory listing with windows.
    - If you have access to the server, entries from the server
    log would be fine too.

    If you don't like to post these data to a public forum, you can
    send them to my private email-address:
    werner.baumann@onlinehome.de

    Cheers
    Werner

     
  • Werner Baumann
    Werner Baumann
    2008-02-13

    • assigned_to: nobody --> wbaumann
     
  • Werner Baumann
    Werner Baumann
    2008-02-15

    Logged In: YES
    user_id=1260327
    Originator: NO

    Hello David,

    thanks for the documents you sent to me.

    Bad news: it's a server bug and working around it in davfs2 is not simple.

    The bug:
    You already noticed the missing "%20". Sharepoint sends URLs in the PROPFIND-response in the form
    <D:href>http://foo.bar/Library/Image Library</D:href>
    but it MUST be percent-encoded, like
    <D:href>http://foo.bar/Library/Image%20Library</D:href>
    Please see RFC 4918, 8.3 URL Handling, and RFC 3986, 2.1. Percent-Encoding and 2.4. When to Encode or Decode.
    http://support.microsoft.com/kb/891393/en-us seems to be related to this bug, but I am not sure whether it is the same bug.
    Please contact the server administrator for fixing this bug.

    Possible workarounds:

    1. The easy one (at least for me ;) ):
    Rename all files that have spaces in the filename. This may not be possible if you have not control over the filenames used. On the other hand: there are still compatibility issues with file names on different operating systems. Though utf-8-encoding is widely used today, it is still a good idea to restrict characters in file names to a secure set, if working in a networked and mixed environment. I suggest: us-ascii only, only use alphanumeric characters, - (hyphen), _ (underscore, . (dot) and ~ (tilde).

    2. workaround in davfs2:
    Parsing of the PROPFIND response is done by the neon-library. It regards href-elements with unescaped spaces as an error, and my code will not even see it. To work around this sharepoint bug I have to eihter copy a lot of neon-code into davfs2 and change it, or use a patched version of neon.
    As it is possible to have different versions of the same library installed in parallel, using a patched version of neon would be the easy way. This would involve:
    - I create a patch for neon
    - you get the neon-sources, apply my patch and install it on your system (in /usr/local)
    - you build davfs2 from the source package, linking against the patched neon.
    Building neon and davfs2 usually works without much pain. If you are interested in this workaround, please tell me.

    Of course, getting microsoft to fix that bug in sharepoint would be the better solution.

    Cheers
    Werner

     
  • david
    david
    2008-02-17

    Logged In: YES
    user_id=1276711
    Originator: YES

    Hallo Werner,

    Thanks for your confirmation.
    I look quickly at the neon code, and yes, it's not a so trivial patch change.
    So I will first try the workaroud n°3 :)
    I will try to access it, through a reverse-proxy and rewrite the space in %20. That should be the quickest fix (I hope). I will let you know if this configuration is working.
    Cheers
    David

     
  • david
    david
    2008-02-17

    Logged In: YES
    user_id=1276711
    Originator: YES

    Hallo Werner,

    Thanks for your confirmation.
    I look quickly at the neon code, and yes, it's not a so trivial patch change.
    So I will first try the workaroud n°3 :)
    I will try to access it, through a reverse-proxy and rewrite the space in %20. That should be the quickest fix (I hope). I will let you know if this configuration is working.
    Cheers
    David

     
  • david
    david
    2008-02-17

    Logged In: YES
    user_id=1276711
    Originator: YES

    Hallo Werner,

    Thanks for your confirmation.
    I look quickly at the neon code, and yes, it's not a so trivial patch change.
    So I will first try the workaroud n°3 :)
    I will try to access it, through a reverse-proxy and rewrite the space in %20. That should be the quickest fix (I hope). I will let you know if this configuration is working.
    Cheers
    David

     
  • Werner Baumann
    Werner Baumann
    2008-04-28

    • status: open --> closed