cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: PUT/POST with Auth Done Right(?)

From: David Byron <DByron_at_everdreamcorp.com>
Date: Tue, 9 Nov 2004 09:47:57 -0800

On Tue, 9 Nov 2004, Jamie Lokier wrote:

> - A large file that takes at least a few seconds to transmit.
> It doesn't have to be >1MB so long as it gives the
> test's answers.
>
> An ethereal trace gives a clear answer. The HTTP headers alone don't.
>
> We'd still need the ethereal trace even if the file was larger than
> 1MB, because you can't tell what happens just from the headers or from
> delays seen only from using IE.

Here are the headers from an IE POST of a 327680 byte file to an IIS 6.0
server with keepalives turned on. The compressed ethereal file is 401
kbytes so I'll send that over private email to Jamie and Daniel.

It feels like the IIS 5.0 situation may be more difficult as far as
dealing with sending the file twice, so if you need more info about
that, let me know.

BTW, I also have NTLM proxies here, and SSL w/ certificates, so if more
complicated scenarios are interesting, I think I can get whatever info
you guys need.

-DB

POST /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=---------------------------7d43c8191b01da
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: 328212
Connection: Keep-Alive
Cache-Control: no-cache

HTTP/1.1 401 Unauthorized
Content-Length: 1656
Content-Type: text/html
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
Date: Tue, 09 Nov 2004 17:34:27 GMT

< No delay up to this point. The authentication dialog box appears
here. >

POST /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=---------------------------7d43c8191b01da
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: NTLM TlRMTVNTUAABAAAAB4IIoAAAAAAAAAAAAAAAAAAAAAA=
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 0

HTTP/1.1 401 Unauthorized
Content-Length: 1539
Content-Type: text/html
Server: Microsoft-IIS/6.0
WWW-Authenticate: NTLM
TlRMTVNTUAACAAAAEAAQADgAAAAFgomiPmseuvX3SAYAAAAAAAAAAOwA7ABIAAAABQLODgAA
AA9FAFgAVABFAFIATgBBAEwAAgAQAEUAWABUAEUAUgBOAEEATAABABwARQBEAC0ARQBDAEMA
SQBJAFMAMAAxAFMAVABHAAQALgBlAHgAdABlAHIAbgBhAGwALgBlAHYAZQByAGQAcgBlAGEA
bQAuAGMAbwByAHAAAwBMAGUAZAAtAGUAYwBjAGkAaQBzADAAMQBzAHQAZwAuAGUAeAB0AGUA
cgBuAGEAbAAuAGUAdgBlAHIAZAByAGUAYQBtAC4AYwBvAHIAcAAFAC4AZQB4AHQAZQByAG4A
YQBsAC4AZQB2AGUAcgBkAHIAZQBhAG0ALgBjAG8AcgBwAAAAAAA=
X-Powered-By: ASP.NET
Date: Tue, 09 Nov 2004 17:34:30 GM

POST /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=---------------------------7d43c8191b01da
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: NTLM
TlRMTVNTUAADAAAAGAAYAGoAAAAYABgAggAAABIAEgBAAAAADAAMAFIAAAAMAAwAXgAAAAAA
AACaAAAABYKIoEUAVgBFAFIARABSAEUAQQBNAGQAYgB5AHIAbwBuAEQAQgBZAFIATwBOAIQ1
Rkwu0Od1AAAAAAAAAAAAAAAAAAAAAGplhYTpLLUnp6Z8rljIYaZ8kBuFqKkU2g==
Connection: Keep-Alive
Cache-Control: no-cache
Content-Length: 328212

< delay here to transfer the file >

HTTP/1.1 200 OK
Date: Tue, 09 Nov 2004 17:34:38 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
UploadID: 38
Content-Length: 88
Content-Type: text/html
Set-Cookie: ASPSESSIONIDSSBSATDC=KDPIALPDACHGDJDBKLKJCHHL; path=/
Cache-control: private
Received on 2004-11-09