Subject: trouble connecting to IIS5 from OS X PB

From: "Benn, Paul" <[email-masked]>
Date: Thu, 1 Mar 2001 18:41:19 -0800

Sorry if this isn't really the right place to ask this question.....  In
experimenting with WebDAV, we can connect to an IIS 5 machine from every MS
client that we've tried. When we attempt from OS X, we get the error: "The
operation could not be completed because the item could not be found."
Could we have a configuration error or is there something known to be broken
in OS X PB?

Thanks for any advice.

Paul

Here's a trace:

Hello World!
Arguments given:
Arg # 1: pbmac2.cap
File signature: GMBU
Frame: 1 client -> server  1077  ____S_
Frame: 2 server -> client  1077  _A__S_
Frame: 3 client -> server  1077  _A____
Frame: 4 client -> server  1077  _AP___
OPTIONS / HTTP/1.1 User-Agent: fetch/1.0 Darwin/1.2 (Power Macintosh)
Accept: */* Host: clab-c1-21.win2ktest.lab.netapp.com:80  Frame: 5 server ->
client  1077  _AP___
HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 01 Mar 2001 22:46:33
GMT MS-Author-Via: DAV Content-Length: 0 Accept-Ranges: none DASL: <DAV:sql>
DAV: 1, 2 Public: OPTIONS, TRACE, GET, HEAD, DELETE, PUT, POST, COPY, MOVE,
MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH Allow: OPTIONS, TRACE, GET,
HEAD, DELETE, COPY, MOVE, PROPFIND, PROPPATCH, SEARCH, MKCOL, LOCK, UNLOCK
Cache-Control: private  Frame: 6 client -> server  1077  _AP___
PROPFIND / HTTP/1.1 User-Agent: fetch/1.0 Darwin/1.2 (Power Macintosh)
Accept: */* Host: clab-c1-21.win2ktest.lab.netapp.com:80 Depth: 0  Frame: 7
server -> client  1077  _AP___
HTTP/1.1 411 Length Required Server: Microsoft-IIS/5.0 Date: Thu, 01 Mar
2001 22:46:33 GMT Connection: close Content-Type: text/html Content-Length:
50  Frame: 8 server -> client  1077  _AP__F
<body><h2>HTTP/1.1 411 Length Required</h2></body>Frame: 9 client -> server
1077  _A____
Frame: 10 client -> server  1077  _A___F
Frame: 11 server -> client  1077  _A____
Goodbye.

---

From: John Stracke <[email-masked]>
Date: Fri, 02 Mar 2001 09:11:30 -0500

"Benn, Paul" wrote:

> HTTP/1.1 411 Length Required

Seems pretty clear: IIS5 wants a Content-Length: 0 if you don't have a message
body.  This seems awkward, but I'm not actually sure it violates the specs.
2518/8.1 says:

     A client may choose not to submit a request body.  An empty PROPFIND
     request body MUST be treated as a request for the names and values of
     all properties.

But in 2616/4.4 (which discusses how to determine the length of the body), the
only way I see to infer that no body is present is to know that the message
MUST NOT have a body (e.g., if it's a GET request or a HEAD response), or else
to see that the server closed the connection after the message (does not work
for requests).  So I think IIS5 is probably within its rights to require
Content-Length: 0...though I personally would have written it to be more
forgiving, and assume that no Content-Length: and no Transfer-Encoding: implies
no body.

--
/==============================================================\
|John Stracke    | http://www.ecal.com |My opinions are my own.|
|Chief Scientist |=============================================|
|eCal Corp.      |Think of it as evolution in action.          |
[email-masked]|                                             |
\==============================================================/

---

From: Greg Stein <[email-masked]>
Date: Fri, 2 Mar 2001 14:44:59 -0800

This is a bug in the MacOS X client DAV library. When it does a PROPFIND, it
doesn't send a Content-Length (as you can see below). A friend of mine at
Adobe just ran into this a week or two ago during some interoperability
testing, but I thought it was just their URLAccess library (rather than a
general issue).

The rules on Content-Length are specified in section 4.4 of RFC 2616.

If a C-L isn't provided, then Apache happens to use a length==0 and assume
there is no body (i.e. if there is, then it'll monkey up the next request).
IIS returns 411. Both are valid approaches.

My Adobe friend just manually inserted a Content-Length: 0 in the request
header when operating on the MacOS platform. That is doable from code, of
course; if their webdavfs doesn't do it (I can't tell what you're using to
talk to the IIS5 box), then you're stuck.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/