maindavfs2 - Support: sr #108841, devfs reports "the server...

 
 

sr #108841: devfs reports "the server does not support WebDAV" if server only supports DAV:2

Submitter:  Zhang Weiwu <zhangweiwu>
Submitted:  Fri 26 Jun 2015 12:38:08 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  _71007
Open/Closed:  Closed Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 26 Jun 2015 07:33:20 AM UTC, comment #1: 

'Is there a reason why dav_class2 capacity doesn't count towards "support WebDAV"?'
Because the specification (RFC 4918, section 10.1 DAV Header and section 18. DAV Compliance Classes) wants it that way.
"Class 2 compliant resources MUST return, at minimum, the values "1" and "2" in the DAV header on all responses to the OPTIONS method."

Don't ask me why it is defined this way. Most probably not even the authors of the specification can answer that question.

Please report this issue as a bug to your server administrator.

Workaround:
Set option "ignore_dav_header 1" in your davfs2.conf file. See "man davfs2.conf" for details.

Werner

- <_71007>
Fri 26 Jun 2015 12:38:08 AM UTC, original submission:  

I've been using a server that only support DAV:2 on all systems: gnome-vfs, Windows 7 (mount DAVFS as a drive), libreoffice etc, except when it comes to davfs, mount fails with "the server does not support WebDAV".

The problem seems to be that this server only declared DAV:2 but not DAV:1.

I dumped the server's response and checked it against source code:

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 25 Jun 2015 10:44:19 GMT
Content-Length: 0
Connection: keep-alive
Keep-Alive: timeout=60
DAV: 2
Allow: DELETE, GET, LOCK, UNLOCK, MKCOL, MOVE, OPTIONS, PROPFIND, PUT
MS-Author-Via: DAV
Pragma: no-cache
Cache-Control: no-cache

The corresponding source code suggests that if the server doesn't have dav_class1 capacity, it will fail with that error, despite it has dav_class2 capacity. Is there a reason why dav_class2 capacity doesn't count towards "support WebDAV"?

int
dav_init_connection(const char *path)
{
    char *spath = ne_path_escape(path);
    ne_server_capabilities caps = {0, 0, 0};
    int ret = ne_options(session, spath, &caps);

    if (!ret) {
        initialized = 1;
        if (!caps.dav_class1 && !ignore_dav_header) {
            if (have_terminal) {
                error(EXIT_FAILURE, 0,
                      _("mounting failed; the server does not support WebDAV"));
            } else {
                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR),
                       _("mounting failed; the server does not support WebDAV"));
                ret = EINVAL;
            }
        }


Zhang Weiwu <zhangweiwu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by zhangweiwu (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-15 _71007 Open/ClosedOpen Closed
    2015-06-26 _71007 StatusNone Done
        Assigned toNone _71007

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code