1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP PUT 6HTTP NTLM auth 7</keywords> 8</info> 9 10# Server-side 11<reply> 12<servercmd> 13auth_required 14</servercmd> 15<data> 16HTTP/1.1 401 NTLM Authorization Required swsclose 17Server: Apache/1.3.27 (Darwin) PHP/4.1.2 18WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 19WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 20WWW-Authenticate: NTLM 21Content-Type: text/html; charset=iso-8859-1 22Connection: close 23 24moo 25</data> 26 27# This is supposed to be returned when the server gets a first 28# Authorization: NTLM line passed-in from the client 29<data1001> 30HTTP/1.1 401 Type-1 received, send back type-2 31Server: Microsoft-IIS/5.0 32Content-Length: 34 33Content-Type: text/html; charset=iso-8859-1 34WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 35 36This is not the real page either! 37</data1001> 38 39# This is supposed to be returned when the server gets the second 40# Authorization: NTLM line passed-in from the client 41<data1002> 42HTTP/1.1 200 Type-3 Recevied and all Things are fine swsclose 43Server: Microsoft-IIS/5.0 44Content-Type: text/html; charset=iso-8859-1 45Content-Length: 32 46 47Finally, this is the real page! 48</data1002> 49 50<datacheck> 51HTTP/1.1 401 NTLM Authorization Required swsclose 52Server: Apache/1.3.27 (Darwin) PHP/4.1.2 53WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 54WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 55WWW-Authenticate: NTLM 56Content-Type: text/html; charset=iso-8859-1 57Connection: close 58 59HTTP/1.1 401 Type-1 received, send back type-2 60Server: Microsoft-IIS/5.0 61Content-Length: 34 62Content-Type: text/html; charset=iso-8859-1 63WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 64 65HTTP/1.1 200 Type-3 Recevied and all Things are fine swsclose 66Server: Microsoft-IIS/5.0 67Content-Type: text/html; charset=iso-8859-1 68Content-Length: 32 69 70Finally, this is the real page! 71</datacheck> 72 73</reply> 74 75# Client-side 76<client> 77<features> 78NTLM 79!SSPI 80</features> 81<server> 82http 83</server> 84 <name> 85HTTP PUT with --anyauth authorization (picking NTLM) 86 </name> 87 <setenv> 88# we force our own host name, in order to make the test machine independent 89CURL_GETHOSTNAME=curlhost 90# we try to use the LD_PRELOAD hack, if not a debug build 91LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 92 </setenv> 93 <command> 94http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth 95</command> 96<precheck> 97chkhostname curlhost 98</precheck> 99<file name="log/put155"> 100This is data we upload with PUT 101a second line 102line three 103four is the number of lines 104</file> 105</client> 106 107# Verify data after the test has been "shot" 108<verify> 109<strip> 110^User-Agent:.* 111</strip> 112<protocol> 113PUT /155 HTTP/1.1 114Host: %HOSTIP:%HTTPPORT 115Accept: */* 116Content-Length: 85 117Expect: 100-continue 118 119PUT /155 HTTP/1.1 120Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 121Host: %HOSTIP:%HTTPPORT 122Accept: */* 123Content-Length: 0 124Expect: 100-continue 125 126PUT /155 HTTP/1.1 127Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 128User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 129Host: %HOSTIP:%HTTPPORT 130Accept: */* 131Content-Length: 85 132Expect: 100-continue 133 134This is data we upload with PUT 135a second line 136line three 137four is the number of lines 138</protocol> 139</verify> 140</testcase> 141