1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP NTLM auth 7 --anyauth 8 followlocation 9 </keywords> 10 </info> 11 # Server-side 12 <reply> 13 14 <data> 15 HTTP/1.1 401 Authorization Required swsclose 16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2 17 WWW-Authenticate: Basic 18 WWW-Authenticate: Wild-and-crazy 19 WWW-Authenticate: NTLM 20 Content-Type: text/html; charset=iso-8859-1 21 Content-Length: 26 22 23 This is not the real page 24 </data> 25 26 # This is supposed to be returned when the server gets a first 27 # Authorization: NTLM line passed-in from the client 28 <data1001> 29 HTTP/1.1 401 Now gimme that second request of crap 30 Server: Microsoft-IIS/5.0 31 Content-Type: text/html; charset=iso-8859-1 32 Content-Length: 34 33 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 34 35 This is not the real page either! 36 </data1001> 37 38 # This is supposed to be returned when the server gets the second 39 # Authorization: NTLM line passed-in from the client 40 <data1002> 41 HTTP/1.1 301 Things are fine in server land swsclose 42 Server: Microsoft-IIS/5.0 43 Connection: close 44 Location: /you/900010 45 46 </data1002> 47 48 # This is the first reply after the redirection 49 <data10> 50 HTTP/1.1 401 Authorization Required swsclose 51 Server: Apache/1.3.27 (Darwin) PHP/4.1.2 52 WWW-Authenticate: Basic 53 WWW-Authenticate: Wild-and-crazy 54 WWW-Authenticate: NTLM 55 Content-Type: text/html; charset=iso-8859-1 56 Content-Length: 26 57 58 This is not the real page 59 </data10> 60 61 <data1011> 62 HTTP/1.1 401 Now gimme that second round of crap 63 Server: Microsoft-IIS/5.0 64 Content-Type: text/html; charset=iso-8859-1 65 Content-Length: 34 66 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 67 68 This is not the real page either! 69 </data1011> 70 71 # This is supposed to be returned when the server gets the second 72 # Authorization: NTLM line passed-in from the client 73 <data1012> 74 HTTP/1.1 200 Things are fine in server land swsclose 75 Server: Microsoft-IIS/5.0 76 Content-Type: text/html; charset=iso-8859-1 77 Content-Length: 32 78 79 Finally, this is the real page! 80 </data1012> 81 82 <datacheck> 83 HTTP/1.1 401 Authorization Required swsclose 84 Server: Apache/1.3.27 (Darwin) PHP/4.1.2 85 WWW-Authenticate: Basic 86 WWW-Authenticate: Wild-and-crazy 87 WWW-Authenticate: NTLM 88 Content-Type: text/html; charset=iso-8859-1 89 Content-Length: 26 90 91 HTTP/1.1 401 Now gimme that second request of crap 92 Server: Microsoft-IIS/5.0 93 Content-Type: text/html; charset=iso-8859-1 94 Content-Length: 34 95 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 96 97 HTTP/1.1 301 Things are fine in server land swsclose 98 Server: Microsoft-IIS/5.0 99 Connection: close 100 Location: /you/900010 101 102 HTTP/1.1 401 Authorization Required swsclose 103 Server: Apache/1.3.27 (Darwin) PHP/4.1.2 104 WWW-Authenticate: Basic 105 WWW-Authenticate: Wild-and-crazy 106 WWW-Authenticate: NTLM 107 Content-Type: text/html; charset=iso-8859-1 108 Content-Length: 26 109 110 HTTP/1.1 401 Now gimme that second round of crap 111 Server: Microsoft-IIS/5.0 112 Content-Type: text/html; charset=iso-8859-1 113 Content-Length: 34 114 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 115 116 HTTP/1.1 200 Things are fine in server land swsclose 117 Server: Microsoft-IIS/5.0 118 Content-Type: text/html; charset=iso-8859-1 119 Content-Length: 32 120 121 Finally, this is the real page! 122 </datacheck> 123 124 </reply> 125 126 # Client-side 127 <client> 128 <features> 129 NTLM 130 !SSPI 131 debug 132 </features> 133 <server> 134 http 135 </server> 136 <name> 137 HTTP with NTLM via --anyauth, and then follow-location with NTLM again 138 </name> 139 <setenv> 140 # we force our own host name, in order to make the test machine independent 141 CURL_GETHOSTNAME=curlhost 142 # we try to use the LD_PRELOAD hack, if not a debug build 143 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 144 </setenv> 145 <command> 146 http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L 147 </command> 148 <precheck> 149 chkhostname curlhost 150 </precheck> 151 </client> 152 153 # Verify data after the test has been "shot" 154 <verify> 155 <strip> 156 ^User-Agent:.* 157 </strip> 158 <protocol> 159 GET /90 HTTP/1.1 160 Host: %HOSTIP:%HTTPPORT 161 Accept: */* 162 163 GET /90 HTTP/1.1 164 Host: %HOSTIP:%HTTPPORT 165 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 166 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 167 Accept: */* 168 169 GET /90 HTTP/1.1 170 Host: %HOSTIP:%HTTPPORT 171 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 172 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 173 Accept: */* 174 175 GET /you/900010 HTTP/1.1 176 Host: %HOSTIP:%HTTPPORT 177 Accept: */* 178 179 GET /you/900010 HTTP/1.1 180 Host: %HOSTIP:%HTTPPORT 181 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 182 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS 183 Accept: */* 184 185 GET /you/900010 HTTP/1.1 186 Host: %HOSTIP:%HTTPPORT 187 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBALIBPdoGahtQQ8gQ7TJrKTYzMjM0NDIzNBFnpKw8B1BLcb456sVeozgBAQAAAAAAAACAPtXesZ0BMzIzNDQyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 188 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS 189 Accept: */* 190 191 </protocol> 192 </verify> 193 </testcase> 194