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