cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: PUT with digest auth, sends HEAD #1054859

From: David Byron <DByron_at_everdreamcorp.com>
Date: Thu, 4 Nov 2004 19:06:26 -0800

On Thu, Nov 4 2004, Jamie Lokier wrote:

> 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).

I don't have any info other than what I pasted in. I can fire up
ethereal if it's gonna help, but probably not for a few days at least.
I'm using ieHTTPheaders to get this info.

> 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.

See below. After the first POST, there was a long delay so I figure the
whole file got sent then. Only after the long delay was I prompted for
username/password. Then comes the next POST (the third one overall, and
the second one with non-zero content length), and another much longer
delay. Looks like 40MB is too big :) and that I caused trouble for the
server. I've pasted the conversation below, and then repeated it again
with a file about 2MB. I may need to get closer to the wire to figure
out what's going on. The first delay (before auth) is way shorter than
the delay after auth. The whole file could be getting transferred and
just dropped on the floor...or at least I could convince myself that
dropping the file is enough faster than writing it to disk to explain
the difference...but I'm just guessing.

> 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.

I may be able to provide this. I'm looking into it.

-DB

Attempt #1
----------
POST /curltest-auth/upload.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d412533240374
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
Host: myhost:myport
Content-Length: 40969179
Connection: Keep-Alive
Cache-Control: no-cache

<long delay>

HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 02:46:54 GMT
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="myhost"
Connection: close
Content-Length: 4431
Content-Type: text/html

<I figure auth happened here and not before the above set of headers>

POST /curltest-auth/upload.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d412533240374
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
Host: myhost:myport
Authorization: Negotiate TlRMTVNTUAABAAAAB4IIoAAAAAAAAAAAAAAAAAAAAAA=
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 0

HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 02:47:49 GMT
WWW-Authenticate: Negotiate
TlRMTVNTUAACAAAAEAAQADgAAAAFgomi0u12nO6sojgAAAAAAAAAALoAugBIAAAABQCTCAAA
AA9FAFgAVABFAFIATgBBAEwAAgAQAEUAWABUAEUAUgBOAEEATAABABwARQBEAC0ARQBDAEMA
SQBJAFMAMAAxAEQARQBWAAQALgBlAHgAdABlAHIAbgBhAGwALgBlAHYAZQByAGQAcgBlAGEA
bQAuAGMAbwByAHAAAwBMAGUAZAAtAGUAYwBjAGkAaQBzADAAMQBkAGUAdgAuAGUAeAB0AGUA
cgBuAGEAbAAuAGUAdgBlAHIAZAByAGUAYQBtAC4AYwBvAHIAcAAAAAAA
Content-Length: 4033
Content-Type: text/htm

POST /curltest-auth/upload.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d412533240374
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
Host: myhost:myport
Authorization: Negotiate
TlRMTVNTUAADAAAAGAAYAGoAAAAYABgAggAAABIAEgBAAAAADAAMAFIAAAAMAAwAXgAAAAAA
AACaAAAABYKIoGUAdgBlAHIAZAByAGUAYQBtAGQAYgB5AHIAbwBuAEQAQgBZAFIATwBOAHb4
yIVK2B9sAAAAAAAAAAAAAAAAAAAAACuS3EzZKDivM9yPchTti3c99K7z+9hRYQ==
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 40969179

<very long delay>

HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 02:47:50 GMT
X-Powered-By: ASP.NET

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 02:57:09 GMT
X-Powered-By: ASP.NET
Content-Length: 476
Content-Type: text/html
Set-Cookie: ASPSESSIONIDAQQSRSCC=ANOHDBNCLFPGJNCKEGOEDHGD; path=/
Cache-control: private

Attempt #2
----------
POST /curltest-auth/upload.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d4226a1e0370
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
Host: myhost:myport
Content-Length: 2204648
Connection: Keep-Alive
Cache-Control: no-cache

<small delay>

HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 03:02:38 GMT
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="myhost"
Connection: close
Content-Length: 4431
Content-Type: text/html

POST /curltest-auth/upload.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d4226a1e0370
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
Host: myhost:myport
Authorization: Negotiate TlRMTVNTUAABAAAAB4IIoAAAAAAAAAAAAAAAAAAAAAA=
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 0

HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 03:02:46 GMT
WWW-Authenticate: Negotiate
TlRMTVNTUAACAAAAEAAQADgAAAAFgomizHvntbKJQrAAAAAAAAAAALoAugBIAAAABQCTCAAA
AA9FAFgAVABFAFIATgBBAEwAAgAQAEUAWABUAEUAUgBOAEEATAABABwARQBEAC0ARQBDAEMA
SQBJAFMAMAAxAEQARQBWAAQALgBlAHgAdABlAHIAbgBhAGwALgBlAHYAZQByAGQAcgBlAGEA
bQAuAGMAbwByAHAAAwBMAGUAZAAtAGUAYwBjAGkAaQBzADAAMQBkAGUAdgAuAGUAeAB0AGUA
cgBuAGEAbAAuAGUAdgBlAHIAZAByAGUAYQBtAC4AYwBvAHIAcAAAAAAA
Content-Length: 4033
Content-Type: text/htmPOST /curltest-auth/upload.asp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Content-Type: multipart/form-data;
boundary=---------------------------7d4226a1e0370
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)
Host: myhost:myport
Authorization: Negotiate
TlRMTVNTUAADAAAAGAAYAGoAAAAYABgAggAAABIAEgBAAAAADAAMAFIAAAAMAAwAXgAAAAAA
AACaAAAABYKIoGUAdgBlAHIAZAByAGUAYQBtAGQAYgB5AHIAbwBuAEQAQgBZAFIATwBOANkh
sse5gEaRAAAAAAAAAAAAAAAAAAAAAImgfRoQkQSn9Gx77hu+R8Av3W5D/W9F8w==
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 2204648

<long delay>

HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 03:02:46 GMT
X-Powered-By: ASP.NET

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 05 Nov 2004 03:03:37 GMT
X-Powered-By: ASP.NET
UploadID: 37
Content-Length: 98
Content-Type: text/html
Set-Cookie: ASPSESSIONIDAQQSRSCC=DEBIDBNCDAOEAHEOAMAOGING; path=/
Cache-control: private
Received on 2004-11-05