davfs2 has problems with MS IIS 7.5 WebDAV server

Bug #1851326 reported by edice
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
davfs2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

davfs2 doesn't work with Microsoft's IIS 7.5 WebDAV implementation, because davfs2 requires the extra translate:f header to be added.

This is not just for MS's implementation, other WebDAV servers apparently added it too.
https://docs.oracle.com/cd/E19146-01/821-1828/gczya/index.html
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wdvse/501879f9-3875-4d7a-ab88-3cecab440034

The docs say that IF the client doesn't send the header, the server should send back a URI to the resource, like a redirect, at least I think so.
But, MS's implementation doesn't. Instead it just returns a "server error 500".

This happens to me ONLY with files that have no extension.
Example: I can get "readme.txt",but I can't get a file called "config" (eg the config file in a .git folder).

It worked on Windows 10, so I used Burp Suite to inspect the HTTPS comms with the server and discovered the translate header. I tested with curl and sure enough it worked with the header.

curl -H "translate: f" --insecure --proxy 127.0.0.1:8080 --user "user:pass" https://the.host.name/folder/project.git/config
WORKED
Without the -H "translate: f", the curl call did not work.

The translate header seems to be added to just about every call to the WebDAV server, except HEAD.

I also made an additional patch for libneon as it has its own functions for building the requests. I don't think this affects davfs2, however for reference, the bug report is here:
https://bugs.launchpad.net/ubuntu/+source/neon27/+bug/1851325

Attached is a patch that fixes up davfs2.

Tags: patch
Revision history for this message
edice (harris-pc) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch to add translate:f header to davfs2" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Woodrow Shen (woodrow-shen) wrote :

Hi edice,

Can you please report to this bug / patch to upstream (https://savannah.nongnu.org/bugs/?group=davfs2) to have a better review from the point of maintainers?

Thanks.

Changed in davfs2 (Ubuntu):
status: New → Incomplete
Revision history for this message
edice (harris-pc) wrote : Re: [Bug 1851326] Re: davfs2 has problems with MS IIS 7.5 WebDAV server

I've reported it here:
https://savannah.nongnu.org/support/index.php?110254

On Sat, 27 Jun 2020 at 14:10, Woodrow Shen <email address hidden>
wrote:

> Hi edice,
>
> Can you please report to this bug / patch to upstream
> (https://savannah.nongnu.org/bugs/?group=davfs2) to have a better review
> from the point of maintainers?
>
> Thanks.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851326
>
> Title:
> davfs2 has problems with MS IIS 7.5 WebDAV server
>
> Status in davfs2 package in Ubuntu:
> New
>
> Bug description:
> davfs2 doesn't work with Microsoft's IIS 7.5 WebDAV implementation,
> because davfs2 requires the extra translate:f header to be added.
>
> This is not just for MS's implementation, other WebDAV servers
> apparently added it too.
> https://docs.oracle.com/cd/E19146-01/821-1828/gczya/index.html
>
> https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wdvse/501879f9-3875-4d7a-ab88-3cecab440034
>
> The docs say that IF the client doesn't send the header, the server
> should send back a URI to the resource, like a redirect, at least I think
> so.
> But, MS's implementation doesn't. Instead it just returns a "server
> error 500".
>
> This happens to me ONLY with files that have no extension.
> Example: I can get "readme.txt",but I can't get a file called "config"
> (eg the config file in a .git folder).
>
> It worked on Windows 10, so I used Burp Suite to inspect the HTTPS
> comms with the server and discovered the translate header. I tested
> with curl and sure enough it worked with the header.
>
> curl -H "translate: f" --insecure --proxy 127.0.0.1:8080 --user
> "user:pass" https://the.host.name/folder/project.git/config
> WORKED
> Without the -H "translate: f", the curl call did not work.
>
> The translate header seems to be added to just about every call to the
> WebDAV server, except HEAD.
>
> I also made an additional patch for libneon as it has its own functions
> for building the requests. I don't think this affects davfs2, however for
> reference, the bug report is here:
> https://bugs.launchpad.net/ubuntu/+source/neon27/+bug/1851325
>
>
> Attached is a patch that fixes up davfs2.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/davfs2/+bug/1851326/+subscriptions
>

Revision history for this message
Woodrow Shen (woodrow-shen) wrote :

Great, thanks. I'm looking forward to expecting community's feedback.

Changed in davfs2 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
edice (harris-pc) wrote :
Download full text (3.8 KiB)

Already got feedback.

In short, upstream doesn't seem a problem with their software not
supporting a major webdav server out of the box,
and also suggests changing the server, something that is not possible in
most corporate environments with IIS.

Will Ubuntu make the necessary changes to make Ubuntu useful in a corporate
environment?
My current solution is to use Windows when I am forced to use the webdav
server in my environment.

Comment from upstream below.

Update of sr #110254 (project davfs2):

                Severity: 4 - Important => 3 - Normal
                  Status: None => Wont Do
             Assigned to: None => wbaumann

    _______________________________________________________

Follow-up Comment #1:

davfs2 already has option add_header to add this header if required. It
might
be a good idea to read the documentation before writing patches: "man
mount.davfs", "man davfs2.conf", "man umount.davfs".

davfs2 will not by default send vendor-specific non-standard headers. You
have
to configure them if needed.

Hint concerning file extensions:
When I tested with IIS many years ago IIS would only deliver files with
extensions that were registerd as known extensions with the windows
operationg
system. So I could upload (with PUT) a file with extension .odt and the file
was stored on the server. But when I tried to retrieve the file with GET I
got
404 NOT FOUND. You might have to change the server configuration to solve
problems with file extensions.

On Wed, 1 Jul 2020 at 16:01, Woodrow Shen <email address hidden>
wrote:

> Great, thanks. I'm looking forward to expecting community's feedback.
>
> ** Changed in: davfs2 (Ubuntu)
> Status: Incomplete => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1851326
>
> Title:
> davfs2 has problems with MS IIS 7.5 WebDAV server
>
> Status in davfs2 package in Ubuntu:
> Confirmed
>
> Bug description:
> davfs2 doesn't work with Microsoft's IIS 7.5 WebDAV implementation,
> because davfs2 requires the extra translate:f header to be added.
>
> This is not just for MS's implementation, other WebDAV servers
> apparently added it too.
> https://docs.oracle.com/cd/E19146-01/821-1828/gczya/index.html
>
> https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wdvse/501879f9-3875-4d7a-ab88-3cecab440034
>
> The docs say that IF the client doesn't send the header, the server
> should send back a URI to the resource, like a redirect, at least I think
> so.
> But, MS's implementation doesn't. Instead it just returns a "server
> error 500".
>
> This happens to me ONLY with files that have no extension.
> Example: I can get "readme.txt",but I can't get a file called "config"
> (eg the config file in a .git folder).
>
> It worked on Windows 10, so I used Burp Suite to inspect the HTTPS
> comms with the server and discovered the translate header. I tested
> with curl and sure enough it worked with the header.
>
> curl -H "translate: f" --insecure --proxy 127.0.0.1:8080 --user
> "user:pass" https://the.host.name/folder/pro...

Read more...

Revision history for this message
Woodrow Shen (woodrow-shen) wrote :

Hi edice,

Please note that davfs2 is universe package and people can contribute patches via SRU process[1], and you can follow this flow to find someone (motu developers) to sponsor this package if you're confident to these changes.

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in davfs2 (Ubuntu):
status: Confirmed → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.