cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PUT with digest auth, sends HEAD #1054859

From: Jamie Lokier <jamie_at_shareable.org>
Date: Fri, 5 Nov 2004 02:13:09 +0000

David Byron wrote:
> Here goes. With the file locally, there's no http traffic to load it in
> my browser. When I do the POST, I get the following. I hope this
> lights the way a bit further.

It looks like IE tries to transmit the POSTed request body (the
uploaded file) twice in this trace, as we'd expect. It uses 3
requests to do it. The request body is sent with the first and third.

IIS/5.0 forces the connection to close after the first request is
refused. ("Connection: close").

David: Is the HTTP connection actually closed at that point, and a new
connection initiated by IE? (It's not obvious from your text when
connections are actually closed).

If you can confirm that, then we see that IE tries again, with a new
connection and a second request with Content-Length: 0.

It's disturbingly un-HTTP, and could fail in some circumstances (where
there are multiple servers behind the same IP or proxy).

And it's different from any of the possibilities we had envisioned
earlier :/

But libcurl can copy this behaviour which is presumably the right
thing to do for NTLM auth.

David: Can you try this test again, uploading a much larger file (like
a megabyte), and see if the request body is fully transmitted twice,
or if IE aborts sending the first one after seeing 401 with
"Connection: close"? We need to know if the whole request body is
transmitted, not just the headers.

We still need somebody to do the same test with IIS/6, which is what
started this whole thing off because IIS/6 (unlike IIS/5) doesn't
force close after the first 401 response.

Thanks again,
-- Jamie
Received on 2004-11-05