Subject: Re: WebFolder does not recognize my WebDAV server

From: [email-masked]
Date: Thu, 19 Oct 2000 17:17:14 +0100

Anton,

You may want to change the server to respond with HTTP/1.1 rather than
HTTP/1.0 to show that it understands the 1.1 level protocol that is a
prerequisite for DAV.

Regards,
Tim

Anton Schegg <[email-masked]> on 2000-10-19 03:53:39 PM

Please respond to Anton Schegg <[email-masked]>

To:   "[email-masked]'" <[email-masked]>
cc:
Subject:  WebFolder does not recognize my WebDAV server

Hello,

I'm currently trying to implement a WebDAV server. Getting properties with
DAV Explorer works, but Microsofts WebFolder does not recognize my
implementation as a valid WebDAV server. Something is missing in my
implementation of the protocol. I append a logfile and hopefully somebody
can give me a hint. (I'm using Tomcat as servlet engine and http server as
well).

Best regards,
Anton Schegg

=========== LOGFILE ====================
************************************
Establish new connection
************************************
------------------------------------
INFO: client -> server
------------------------------------
OPTIONS / HTTP/1.1
User-Agent: Microsoft Data Access Internet Publishing Provider Cache
Manager
Host: muc01134:8888
Content-Length: 0
Connection: Keep-Alive

------------------------------------
INFO: server -> client
------------------------------------
HTTP/1.0 200 OK
------------------------------------
INFO: server -> client
------------------------------------
Status: 200
------------------------------------
INFO: server -> client
------------------------------------
Allow: GET, HEAD, POST, TRACE, OPTIONS
Content-Type: text/plain
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.1.4;
Windows NT 5.0 x86; java.vendor=Microsoft Corp.)
Date: Thu, 19 Oct 2000 14:59:59 GMT+00:00
Content-Language: en

sender has closed connection: client -> server
connection closed
************************************
Establish new connection
************************************
------------------------------------
INFO: client -> server
------------------------------------
GET /_vti_inf.html HTTP/1.1
Date: Thu, 19 Oct 2000 14:59:59 GMT
MIME-Version: 1.0
Accept: */*
User-Agent: Mozilla/2.0 (compatible; MS FrontPage 4.0)
Host: muc01134:8888
Accept: auth/sicily
Content-Length: 0
Connection: Keep-Alive

------------------------------------
INFO: server -> client
------------------------------------
HTTP/1.0 404 Not Found
------------------------------------
INFO: server -> client
------------------------------------
Status: 404
------------------------------------
INFO: server -> client
------------------------------------
Content-Type: text/html
------------------------------------
INFO: server -> client
------------------------------------
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.1.4;
Windows NT 5.0 x86; java.vendor=Microsoft Corp.)
------------------------------------
INFO: server -> client
------------------------------------
Date: Thu, 19 Oct 2000 14:59:59 GMT+00:00
------------------------------------
INFO: server -> client
------------------------------------
Content-Language: en
------------------------------------
INFO: server -> client
------------------------------------

------------------------------------
INFO: server -> client
------------------------------------
<h1>Error: 404</h1>
<h2>Location: /_vti_inf.html</h2>File Not Found<br>/_vti_inf.html
sender has closed connection: server -> client
sender has closed connection: client -> server
************************************
Establish new connection
************************************
------------------------------------
INFO: client -> server
------------------------------------
POST /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1
Date: Thu, 19 Oct 2000 14:59:59 GMT
MIME-Version: 1.0
User-Agent: MSFrontPage/4.0
Host: muc01134:8888
Accept: auth/sicily
Content-Length: 41
Content-Type: application/x-www-form-urlencoded
X-Vermeer-Content-Type: application/x-www-form-urlencoded
Connection: Keep-Alive

method=server+version%3a4%2e0%2e2%2e3717

------------------------------------
INFO: server -> client
------------------------------------
HTTP/1.0 404 Not Found
------------------------------------
INFO: server -> client
------------------------------------
Status: 404
Content-Type: text/html
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.1.4;
Windows NT 5.0 x86; java.vendor=Microsoft Corp.)
Date: Thu, 19 Oct 2000 14:59:59 GMT+00:00
Content-Language: en

<h1>Error: 404</h1>
<h2>Location: /_vti_bin/shtml.exe/_vti_rpc</h2>File Not
Found<br>/_vti_bin/shtml.exe/_vti_rpc
sender has closed connection: server -> client
connection closed
************************************
Establish new connection
************************************
------------------------------------
INFO: client -> server
------------------------------------
OPTIONS /DAV HTTP/1.1
Accept-Language: de, en-us;q=0.5
User-Agent: Microsoft Data Access Internet Publishing Provider DAV 1.1
Host: muc01134:8888
Content-Length: 0
Connection: Keep-Alive

------------------------------------
INFO: server -> client
------------------------------------
HTTP/1.0 200 OK
------------------------------------
INFO: server -> client
------------------------------------
Status: 200
------------------------------------
INFO: server -> client
------------------------------------
MS-Author-Via: DAV
Allow: OPTIONS, GET, HEAD, POST, DELETE, TRACE, PROPFIND, PROPPATCH, COPY,
MOVE, LOCK, UNLOCK
DAV: 1,2
Content-Type: text/plain
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.1.4;
Windows NT 5.0 x86; java.vendor=Microsoft Corp.)
Date: Thu, 19 Oct 2000 14:59:59 GMT+00:00
Content-Language: en

sender has closed connection: client -> server
connection closed
************************************
Establish new connection
************************************
------------------------------------
INFO: client -> server
------------------------------------
PROPFIND /DAV HTTP/1.1
Accept-Language: de, en-us;q=0.5
Content-Type: text/xml
Translate: f
Content-Length: 0
Depth: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV 1.1
Host: muc01134:8888
Connection: Keep-Alive

------------------------------------
INFO: server -> client
------------------------------------
HTTP/1.0 207 Multi-Status
------------------------------------
INFO: server -> client
------------------------------------
Status: 207
------------------------------------
INFO: server -> client
------------------------------------
Content-Type: text/xml; charset="utf-8"
------------------------------------
INFO: server -> client
------------------------------------
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.1.4;
Windows NT 5.0 x86; java.vendor=Microsoft Corp.)
Date: Thu, 19 Oct 2000 14:59:59 GMT+00:00
Content-Language: en

<?xml version="1.0" encoding="UTF-8"?>
<DAV:multistatus>
    <DAV:response>
        <DAV:href>/DAV/</DAV:href>
        <DAV:propstat>
            <DAV:prop>
                <DAV:creationdate>2000-08-21T09:21:17Z</DAV:creationdate>
                <DAV:getlastmodified>Wed, 13 Sep 2000 09:40:34
GMT</DAV:getlastmodified>
                <DAV:getetag>&quot;0-0-39bf4b92&quot;</DAV:getetag>
                <DAV:supportedlock>
                    <DAV:lockentry>
                        <DAV:lockscope>
                            <DAV:exclusive/>
                        </DAV:lockscope>
                        <DAV:locktype>
                            <DAV:write/>
                        </DAV:locktype>
                    </DAV:lockentry>
                    <DAV:lockentry>
                        <DAV:lockscope>
                            <DAV:shared/>
                        </DAV:lockscope>
                        <DAV:locktype>
                            <DAV:write/>
                        </DAV:locktype>
                    </DAV:lockentry>
                </DAV:supportedlock>
                <DAV:lockdiscovery/>
                <DAV:resourcetype>
                    <DAV:collection/>
                </DAV:resourcetype>

<DAV:getcontenttype>httpd/unix-directory</DAV:getcontenttype>
            </DAV:prop>
            <DAV:status>HTTP/1.1 200 OK</DAV:status>
        </DAV:propstat>
    </DAV:response>
</DAV:multistatus>
sender has closed connection: server -> client
sender has closed connection: client -> server

---

From: Madan Mohan <[email-masked]>
Date: Thu, 19 Oct 2000 09:42:11 -0700

Hi

You have to inform WebFolders that you support WedDav. Or else it will look
for frontpage extensions (_vtf_inf.html). So for the OPTIONS request that is
comming first you should respond by giving the headers DAV and MS-Author-Via

"DAV :1.1"
"MS-Author-Via: DAV"  

When WebFolders sees this then it will send a PROPFIND webdav request
instead of the GET request that you are getting now

Cheers
D.Madan Mohan

---

From: Anton Schegg <[email-masked]>
Date: Fri, 20 Oct 2000 08:34:12 +0200

Hello all,

Thanks for the answers. Specifying the namespace (xmlns:D="DAV:") in the
multistatus response is the solution.

Confusion was caused probably through the following:
I specified "http://muc01134:8888/DAV/" in WebFolder. "/DAV/" induces tomcat
to invoke my own servlet (because I configured it in that way). WebFolder
now tries to get a response from "http://muc01134:8888/" before finally
going to try "http://muc01134:8888/DAV/". This is the reason for having some
leading requests (WebFolder checks for frontpage extensions) and responses
in my logfile, which are handled by the HTTP-Server itself and without
invoking my servlet.

Best regards,
Anton Schegg

-----Original Message-----
From: Greg Stein [mailto:[email-masked]]
Sent: Thursday, October 19, 2000 11:00 PM
To: Anton Schegg
Cc: [email-masked]'
Subject: Re: WebFolder does not recognize my WebDAV server

Oh, geez. What has this list come to. Three replies, and three incorrect (or
close to it) answers...

A1: "respond with HTTP/1.1"
--> well, this is obviously not a prerequisite because we see that Web
    Folders *does* end up doing a PROPFIND. So it obviously doesn't mind.

A2: "use 'DAV :1.1' and 'MS-Author-Via: DAV'"
--> the former should be the 'DAV: 1,2' header and the latter is not
    required (it simply optimizes out a round trip). We also see in the log
    below that Anton returns those for the /DAV directory.

A3: "return MKCOL and PROPFIND in the OPTIONS response"
--> he is returning PROPFIND (but not MKCOL). Web Folders doesn't need the
    MKCOL... it already believes there is a DAV server there by the simple
    evidence that it issues a PROPFIND.

Sigh. Yes, using HTTP/1.1 in the response is a good idea and is technically
required (and it will help with connection persistence and request
pipelining). But it isn't a precondition. It would be good to return MKCOL,
too. I'd also suggest getting rid of that Status: header (it's useless).

I believe your real problem exists in the Multistatus response. You are
using the "DAV" namespace *prefix*, but have not placed the elements into
the "DAV:" *namespace*. Change your outermost element to:

<DAV:multistatus xmlns:DAV="DAV:">

That should hopefully do the trick. I haven't thoroughly analyzed the body
of your multistatus, but a rough glance seems to show it is okay.

Also, have you seen the Slide project? http://jakarta.apache.org/slide/
Or the Magi-DAV project? http://magi.endeavors.org/

Cheers,
-g

---

From: "Jim Whitehead" <[email-masked]>
Date: Fri, 20 Oct 2000 16:24:17 -0700

Accidentally caught by the spam filter. I've added Joe's new email address
to the accept2 list.

- Jim

-----Original Message-----
From: Joe Orton [mailto:[email-masked]]
Sent: Thursday, October 19, 2000 2:31 PM
To: [email-masked]'
Subject: [Moderator Action] Re: WebFolder does not recognize my WebDAV
server

The OPTIONS response should include the headers

DAV: 1
MS-Author-Via: DAV

(the latter is only for best results against MS clients) As others have
said, PROPFIND etc in the Allow header (don't know if MS clients check
this or not).

> Date: Thu, 19 Oct 2000 14:59:59 GMT+00:00

... then, the PROPFIND response is not right. You need to use namespaces
properly, e.g.

<D:multistatus xmlns:D="DAV:">